Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp468701pxj; Wed, 16 Jun 2021 06:39:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyHF4m4QmILd7uUI9A0R9QAqfYeuTbFWD6E6+9oKTLWpOTnvnLAFWhT9rnagdKfmBHhZ4NA X-Received: by 2002:a05:6602:50:: with SMTP id z16mr18593ioz.155.1623850799385; Wed, 16 Jun 2021 06:39:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623850799; cv=none; d=google.com; s=arc-20160816; b=0Ft1ZBJOsCAhNKG8MlG5Zwb15KWwnoRmwI7ICrwAm9HU/yZQr42M1LNHMK7S+qtfGp Y4208FQu5/3N2KDYju68VRP32yTH7wBWtv/2fbeUGKscmfN/IOrdb7WymVMs0ooGdQgo M8vKbdikRC/f3aYRaOZhEUy2TgOyYFCVXFZtI3AFePpjSJ8+Zle6ySJ6xtQDWFJHhW7S CirCOjQQkXnE2aE6K1dCy9/jm3SY1zsycrayio7WOKTTiwBSU9T6EWplEyYrznZ0g72x wz5RzSALKVZqQcbvVd6bN51EQbI03cLljG/EOtGBJ6fy8Ng6LRYts2RCy94BI8NvitBk uI1g== 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=vsbVqj8vQPiJ0CHWJACAjat2+GYrJT9yCobDrhWYwuI=; b=0sSrm2YXVuuL9/PFIcK2XRfayYF1MMBOvnQW4C4D5A9d5tKvUy4Abc0Kzw8BhiBqtP bhiFIPHN6O4TcjbJPcpcwh631zDT40XzIfR9lM3/5iPH7io5bwoWVOhP6CoNJnt94Dyw 1dZU7n56AmXKp8ayy2YwCbzBJ0+cI/pIKq3MY5lEFeR9ZD+6D/KJnNlCD3IYhEUQU2nz +ft4Rq3iQNZ05bH7BbQn4rgIdqIYKc/2pFktTq5nnCKj9GDXrN/l0H8OKrrXjEUVsPyH 5cSD9hyzpVQDo2T6uaZqRv4rg9kR5OuDfcznmlptxDDp8gMK/BkfdB9ncBOjurhm99Ic mTzQ== 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 g27si3284186iob.54.2021.06.16.06.39.46; Wed, 16 Jun 2021 06:39:59 -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 S233100AbhFPMsm (ORCPT + 99 others); Wed, 16 Jun 2021 08:48:42 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:49275 "EHLO relay5-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232978AbhFPMsR (ORCPT ); Wed, 16 Jun 2021 08:48:17 -0400 Received: (Authenticated sender: jacopo@jmondi.org) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 6A2901C001A; Wed, 16 Jun 2021 12:46:08 +0000 (UTC) From: Jacopo Mondi To: Hans Verkuil , 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 v5 14/15] media: i2c: rdacm20: Check return values Date: Wed, 16 Jun 2021 14:46:15 +0200 Message-Id: <20210616124616.49249-15-jacopo+renesas@jmondi.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210616124616.49249-1-jacopo+renesas@jmondi.org> References: <20210616124616.49249-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. Signed-off-by: Jacopo Mondi Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- 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