Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1636468pxb; Mon, 22 Feb 2021 07:10:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJyJS805rgI3OT3X+aBzOLautPSmfXs7Xbx+2YafV9/Xo63vdpcGYto802tHvx+mmmLX9twf X-Received: by 2002:a17:907:770d:: with SMTP id kw13mr21638064ejc.219.1614006638410; Mon, 22 Feb 2021 07:10:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614006638; cv=none; d=google.com; s=arc-20160816; b=KuzTl6/NXFpfuKcPdsm6UUNvjF8BRaCILnZiC8PwbBCM/p0OyHTF1AWoUl1V9FWBJT eBa3tqkPKJUD/AyK95GwbJWNdku1arYXafBMlhIUTbiKqsOyriC8nWx9Gm46FY/Nk1gj UQUk4oDrgae9nM15G8JvHeRAVxuSPNQUliyqE17xAFpi9dfXFtzdDHde32iesCpYIu1y s6BA9OU33yRn7Z8KzTfI2f56QDSWiYi68lVzmxipeA2bFn0oBqJ5VxyvEnlK8YSazK1a bwfOf4hhOeGbIUy2Fuu3x9NpVykK95BWvjMtCa1jPkTgF9sRbMbxJxPI+uTdnEaznnlD 4O7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=U+5wNFD0kbu+g5LSAkNYIInjsEFDJM5yX2tKiTeEWTQ=; b=DOSM8KqSAELANSERzx81LoHdBRpsR24CfkEY3UYEAlFZDP/stSbizcWDdoAAVbEKuF O0Sq1oOCdxqWegRm+P3nMsMsRpG97CpzyJkLBiG4LxFvFlyiUV4djvW/L2PqgnWScQRO Iw7X3rLfHmJrmgZAjTmhp5Tw65vgt3WP2o768LQWuRsUR39J8Lu8eBhJS5P8lMlJbGOP 2EtFSIMW//5vAQ2LwGCgMkOOXuCh3pEoLEmysCiaCAadbblv5hU299FynzXLwIl6gjOr tpN1OvlvYcK76ctn77jdq1At5eqbyxMhv5XScMUlcZYLzOW8npN+2lplB57V4XMByk+9 L4GA== 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 lr3si12897582ejb.514.2021.02.22.07.10.13; Mon, 22 Feb 2021 07:10:38 -0800 (PST) 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 S230510AbhBVPJR (ORCPT + 99 others); Mon, 22 Feb 2021 10:09:17 -0500 Received: from relay12.mail.gandi.net ([217.70.178.232]:55015 "EHLO relay12.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230021AbhBVPJB (ORCPT ); Mon, 22 Feb 2021 10:09:01 -0500 Received: from uno.localdomain (93-61-96-190.ip145.fastwebnet.it [93.61.96.190]) (Authenticated sender: jacopo@jmondi.org) by relay12.mail.gandi.net (Postfix) with ESMTPSA id 37DD320000E; Mon, 22 Feb 2021 15:07:58 +0000 (UTC) Date: Mon, 22 Feb 2021 16:08:25 +0100 From: Jacopo Mondi To: Laurent Pinchart Cc: Jacopo Mondi , kieran.bingham+renesas@ideasonboard.com, niklas.soderlund+renesas@ragnatech.se, geert@linux-m68k.org, Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 05/16] media: i2c: rdacm20: Check return values Message-ID: <20210222150825.xbmikkm7qyjihfr4@uno.localdomain> References: <20210216174146.106639-1-jacopo+renesas@jmondi.org> <20210216174146.106639-6-jacopo+renesas@jmondi.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi On Mon, Feb 22, 2021 at 03:09:26AM +0200, Laurent Pinchart wrote: > Hi Jacopo, > > Thank you for the patch. > > On Tue, Feb 16, 2021 at 06:41:35PM +0100, Jacopo Mondi wrote: > > The camera module initialization routine does not check the return > > value of a few functions. Fix that. > > > > 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 56406d82b5ac..e982373908f2 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; > > This looks good, so > > Reviewed-by: Laurent Pinchart > > But it would be more useful if max9271_configure_gmsl_link() returned > errors when I2C writes fail :-) > Indeed, I'll add a patch to report back errors on failed i2c writes. Thanks j > > > > ret = max9271_verify_id(&dev->serializer); > > if (ret < 0) > > -- > Regards, > > Laurent Pinchart