Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1559869pxf; Fri, 19 Mar 2021 09:46:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx0fELur+Z90eKW2S1ON4ZYhx6EzX3CmUhPK78RKSeqwo3/HPnnRD3Kf9OH47gXwIMJfDwg X-Received: by 2002:a05:6402:5113:: with SMTP id m19mr10830410edd.78.1616172408125; Fri, 19 Mar 2021 09:46:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616172408; cv=none; d=google.com; s=arc-20160816; b=ihIwpIUNxAAaKQefbEC8owvfQQOdtl9kaBlcTTdw6tu97nddtjsstf25AFa+7QCDVf tTPMXupPNl3516C49YEUexpKLNTre+ivorE18cwqfVhKQ4ocn+ABfnnpGv3YVcn1TG/T bGR3LRZSpWQ+rT5eYxcXPPbDaxh0Fv4QRIo6HwZ14fSfquQmKeEsRWcH0KpLvnJpJ/TJ TS9nXhTKy3ypaxgvjlvFHsBHSa0Opa002OpflifO1po7SauZ+SoE+o+FcTq6s6PYuDVR 3jTVxcN0+sJCQw/3GtcncdTzKCMZtVqirUmm/vkz5EOHgX5tULcLG/AMwwRFLwy9RyGw klZg== 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=MOhwXOQA/xjw2yBS0IxQlsEEuyP5y0xhIRsfU/V1ORw=; b=ewwFR9Y+zAD2EjvX9Y8RmDwNcm6HcsPE1L95NMlNzGSMM6uYd+RzO3cD3ptLSCaEbe UMzpUMKY9y5oASQCvOlOxyVf6Oq78sFhS3mBNVW28ZVHpbgb3QI7w6mkF7O9+VHnoHyS dVJTo6R5FlFaXKgNYMfC5sM421/yD1oldDvPndBNpAGlSzzMhkJ+ITXJFGwRyi0zg8/Z s2QG/gpQGgMACTQyJR+jiHVvJ3KMeb0yFGQaN5W596kfMre8nDkbLSPK7+Smj339Ychd PDQlmgovrOdVg1h8ijQYzIYxC/Oe0aqvZuGJMKiT61M4ejuhsQSmzrr4VC0GqC58HIOq btTg== 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 c18si4534214ejr.332.2021.03.19.09.46.25; Fri, 19 Mar 2021 09:46:48 -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 S231231AbhCSQnD (ORCPT + 99 others); Fri, 19 Mar 2021 12:43:03 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:34129 "EHLO relay6-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230468AbhCSQma (ORCPT ); Fri, 19 Mar 2021 12:42:30 -0400 X-Originating-IP: 5.92.35.220 Received: from uno.localdomain (mob-5-92-35-220.net.vodafone.it [5.92.35.220]) (Authenticated sender: jacopo@jmondi.org) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id DA386C0006; Fri, 19 Mar 2021 16:42:25 +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 v3 18/19] media: i2c: rdacm20: Check return values Date: Fri, 19 Mar 2021 17:41:47 +0100 Message-Id: <20210319164148.199192-19-jacopo+renesas@jmondi.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210319164148.199192-1-jacopo+renesas@jmondi.org> References: <20210319164148.199192-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 d3a2520c4113..7ed3866b5335 100644 --- a/drivers/media/i2c/rdacm20.c +++ b/drivers/media/i2c/rdacm20.c @@ -447,11 +447,16 @@ static int rdacm20_init(struct v4l2_subdev *sd, unsigned int val) * 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