Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2147872pxb; Mon, 12 Apr 2021 16:04:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJmbULKZ7zT0fg/vSQP59gom8j9XK0g0UYlZlyvx8mvqo1XEAfpn0pn7u/XSXCXk0K1COM X-Received: by 2002:a17:902:a60c:b029:ea:c9fd:a170 with SMTP id u12-20020a170902a60cb02900eac9fda170mr13248870plq.14.1618268640770; Mon, 12 Apr 2021 16:04:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618268640; cv=none; d=google.com; s=arc-20160816; b=lKaUiZlLErEneXGx+WwU/beVVzARSgYnxi6EMG5VgQnUzZNrRmOde2MyKv1YsfsiGW yYvcVde6mMW+vrX1k534hxmJ1RYu4pml3exPiRHNiB6/LzspJDLvq+rTOV/kxGIsXxiX tji3bTl9FG+AmN8xWKRz26EiNp/UZ4eMA0G89mL3uAH2pRGm0bSDEvET4Pnmy4nxYfuv 6tpXASZvT/BTgEu91V6eHSUUi+s0qs3+WkVOlEjP3n32RFMkrD/tt9G90ssryuGeVih8 7oWQUwrLPOIn8PsnFWNx3NeKUGHF2Hw2FsetQlBjn/kx/PNIxLy8N4iOyujn81QhEdf2 83Nw== 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=QyyY5wvW29xCCx9xZtNBmMA0oK/i0ipcK43gi+m6pEk=; b=Ri+OuVQXP1jxgWRQ6z6M/MSXDJx//MKw5GX8hPOCOanwQJFLO4aVFHvLzkk+ET2sRa 5WiwNrEa+57mB4pXuuX8oTpiGKl9T5kc+fFzBECprC1WTfEpcPRPIutHivCbU8I7tMeX q1nMs2dSNIrPXjHFGJ9hOfeJhJoUDtdCOKTmFvKLegtRxOcTUV2VGRH+LMroW4s0+Etp Pc+2UpFPtzfdHoVMAs+mFBTXhmKgy009+0+bysNASfgzCbp4ftVL/AdsbL+rYWdMGbW0 vyOMIQzeXKKyY03kLtt05wH79MKLBbTlRvHomLQoAScu/B3xxiVdoDCZ/eHKr4/S0pel xiMg== 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 j12si1268053pfr.216.2021.04.12.16.03.47; Mon, 12 Apr 2021 16:04:00 -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 S242450AbhDLJuN (ORCPT + 99 others); Mon, 12 Apr 2021 05:50:13 -0400 Received: from relay12.mail.gandi.net ([217.70.178.232]:41613 "EHLO relay12.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241058AbhDLJgq (ORCPT ); Mon, 12 Apr 2021 05:36:46 -0400 Received: from uno.lan (93-34-118-233.ip49.fastwebnet.it [93.34.118.233]) (Authenticated sender: jacopo@jmondi.org) by relay12.mail.gandi.net (Postfix) with ESMTPSA id DC0C5200012; Mon, 12 Apr 2021 09:34:47 +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 v4 14/17] media: i2c: rdacm20: Check return values Date: Mon, 12 Apr 2021 11:34:48 +0200 Message-Id: <20210412093451.14198-15-jacopo+renesas@jmondi.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210412093451.14198-1-jacopo+renesas@jmondi.org> References: <20210412093451.14198-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 f1819bfa165d..e6fed86a3281 100644 --- a/drivers/media/i2c/rdacm20.c +++ b/drivers/media/i2c/rdacm20.c @@ -466,11 +466,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.31.1