Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3285220pxf; Mon, 15 Mar 2021 06:17:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyM0q2uTxdDs8z61wanVpdFRMGZ09tjnSsYgUCpJhG1zWJrGCHqKOROT+sFkS5mSxSrWNRT X-Received: by 2002:a17:907:788e:: with SMTP id ku14mr23931865ejc.17.1615814236679; Mon, 15 Mar 2021 06:17:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615814236; cv=none; d=google.com; s=arc-20160816; b=SKEtjcLghKEy+c3qlo8f4/pFFrVsdWSlvIVgEdsXS6B0A8jZJvCk/HF2Ug7txp2phI 3+zFgkYMKYk/PdRrYL7rnFkVX5OWgPdz9t2xnVm2bRM4xo/a5zEOq+rnrzbYnwlMrfDU tqWLUS77AIUaiHJIuIoRaYuS1EXrYUbiL77Y6UOxiJ4qNbdOZ1tVgRFS7BFSfvP3I6NC 4RMXEz9YHZ+9nxuBoH3QdhiHM4w33eA6GU1QFDRpPF/b+aXPjqgC1lYLPmbMXPmr4o+S zghWYgvmKmqWV7SWr/EtYrIz0/h5ultO7ushnPLuVvOacQ8MQlYIxip2d6luvERLUEPM kIfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=2nqR8KiM0G/3iUSXCXDzhUqIE4jmwquYbuvSx0KNXDM=; b=L0rIc9dhhhDEuYcQxHFPL+bF5Pb/iA26bhVJp6Pqo03tIlwZAis+lDNSeHZKancoUO oycZ0k1g6eqVYDS4LIoIPN4EUOIoqga5OKGb1+G2AwvbUlsLt7YjRKX/Ftir1eO0U9FV BdBRStm7+RfLgmPCZ36nQqnSbdi67l6oCAEkOy6ZHOnDfZ7/EZmko5PnTrGOMkTxz2h3 hHOmcbPQu0L0l95MOZNSpLSujxZcgUsGXHqvYCyNAc7xL5iPTo5m8vdpkzq/5Qlkpd/J hb1O2jjWckYciGpV/DfL6gyzvFYkKQpfbRuXRLyoXHV7AuwAvxQovypKT2ju9H4aUQ00 sTgQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z22si1480510edm.203.2021.03.15.06.16.54; Mon, 15 Mar 2021 06:17:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230516AbhCONPn (ORCPT + 99 others); Mon, 15 Mar 2021 09:15:43 -0400 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:36461 "EHLO relay9-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230158AbhCONPN (ORCPT ); Mon, 15 Mar 2021 09:15:13 -0400 X-Originating-IP: 79.22.58.175 Received: from uno.homenet.telecomitalia.it (host-79-22-58-175.retail.telecomitalia.it [79.22.58.175]) (Authenticated sender: jacopo@jmondi.org) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 17633FF805; Mon, 15 Mar 2021 13:15:08 +0000 (UTC) From: Jacopo Mondi To: kieran.bingham+renesas@ideasonboard.com, laurent.pinchart+renesas@ideasonboard.com, niklas.soderlund+renesas@ragnatech.se, geert@linux-m68k.org Cc: Jacopo Mondi , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Laurent Pinchart Subject: [PATCH v2 07/18] media: i2c: rdacm20: Check return values Date: Mon, 15 Mar 2021 14:15:01 +0100 Message-Id: <20210315131512.133720-8-jacopo+renesas@jmondi.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210315131512.133720-1-jacopo+renesas@jmondi.org> References: <20210315131512.133720-1-jacopo+renesas@jmondi.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The camera module initialization routine does not check the return value of a few functions. Fix that. Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Jacopo Mondi --- drivers/media/i2c/rdacm20.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/media/i2c/rdacm20.c b/drivers/media/i2c/rdacm20.c index 85456e00ba4f..312450db958d 100644 --- a/drivers/media/i2c/rdacm20.c +++ b/drivers/media/i2c/rdacm20.c @@ -470,11 +470,16 @@ static int rdacm20_initialize(struct rdacm20_device *dev) * Ensure that we have a good link configuration before attempting to * identify the device. */ - max9271_configure_i2c(&dev->serializer, MAX9271_I2CSLVSH_469NS_234NS | - MAX9271_I2CSLVTO_1024US | - MAX9271_I2CMSTBT_105KBPS); + ret = max9271_configure_i2c(&dev->serializer, + MAX9271_I2CSLVSH_469NS_234NS | + MAX9271_I2CSLVTO_1024US | + MAX9271_I2CMSTBT_105KBPS); + if (ret) + return ret; - max9271_configure_gmsl_link(&dev->serializer); + ret = max9271_configure_gmsl_link(&dev->serializer); + if (ret) + return ret; ret = max9271_verify_id(&dev->serializer); if (ret < 0) -- 2.30.0