Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp6652486pxb; Wed, 17 Feb 2021 09:43:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJwgXIChicApQ2hdW/mBIDN9LxnujiB1ryF3606YgvNK9OGpTQ3H2yPTA9KOb/zxRDSQQzbv X-Received: by 2002:a05:6402:270d:: with SMTP id y13mr27491154edd.149.1613583811474; Wed, 17 Feb 2021 09:43:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613583811; cv=none; d=google.com; s=arc-20160816; b=RjkBZycsuKqY06MxC+nRjwFRvcD0J1IcxooOjLNomdvCWBHXtq7RmayIsKZ26WBoRy vODEeqx8a7tZvcwVpFIPzD2pquRMCMB1jpK6BFggQvXcXaqPcubFCAele9ccHzcL1AMH qEU2XsnSwKnNPr02ngzzmWChGpxA/3h2qy03lY34SN/pXWhfbsAVI716r4l0uMkoGyKD r9hwloILNDUUQ3KMjMztIeZcVKPpDIb79GqsmZghKM0fzQR9IXep/TGzvcn74pUXqGvk TDsjLjvOnvt9PQWFY/pj+EVFyffv7OfS8uxx8YalkSNdhsQ1pOKJ8smEy/XdmcC0aWI5 styg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject:reply-to:dkim-signature; bh=dIIM5MKuzZqeQB9a2QYP6/6tQ0klyG48ybTRLBc6398=; b=T0iVM9uyW2fq7aoRaYgi8rmSm2Neen5ID6TXMtn4xriWMMnQzEBTlr4aCNszK55jeb oRj9HnD+A81zjdr8GQoHrjulOYfEhemYNb0r7ivdvdt7urd9GGcm5PrMltFCrH/lXVEc ODe38TlvUHrULi3xZj+jFY7pt6o4dIGA8kshvOEBgLyFlDLdVbuom16+iLrtqqePmnej 5O/kewUB3n4qTnpUhS5mlvydcUb3P82aV/ohab8gDWsrd2QVGb39I/BNCcXP8jEK0HRx D40BaqLCk6Rp4A5HYTuACZPVVL8qbeN6SlNNV8oKwDv73EdBJJM1wQdrz6d7ePH8AJQJ KPyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=oYKeghuH; 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 yz13si1979139ejb.117.2021.02.17.09.42.22; Wed, 17 Feb 2021 09:43:31 -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; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=oYKeghuH; 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 S232111AbhBQNJR (ORCPT + 99 others); Wed, 17 Feb 2021 08:09:17 -0500 Received: from perceval.ideasonboard.com ([213.167.242.64]:49536 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231709AbhBQNJQ (ORCPT ); Wed, 17 Feb 2021 08:09:16 -0500 Received: from [192.168.0.20] (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 187FB8C4; Wed, 17 Feb 2021 14:08:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1613567313; bh=NNpm0Hf3kc3W6OJD+qsniy9E/7kXWfNfBU8EusaNjks=; h=Reply-To:Subject:To:Cc:References:From:Date:In-Reply-To:From; b=oYKeghuHn4yo3hFxXoPlFvqYk/t7MAVnMx8/Fcdf/wVCS2pphuQzTHpNo1cbXyMfu 4q6UcjD3H1P61UXiQpjOuv3ihuX4SsTmZoO3sx1mR4Nd+yYkxWP4fwdL1Jx4LpHrvi iWafh47BA2zodEqR8MAvNLGGgDapQmZIEsdpK2tA= Reply-To: kieran.bingham+renesas@ideasonboard.com Subject: Re: [PATCH 05/16] media: i2c: rdacm20: Check return values To: Jacopo Mondi , laurent.pinchart+renesas@ideasonboard.com, niklas.soderlund+renesas@ragnatech.se, geert@linux-m68k.org Cc: Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210216174146.106639-1-jacopo+renesas@jmondi.org> <20210216174146.106639-6-jacopo+renesas@jmondi.org> From: Kieran Bingham Organization: Ideas on Board Message-ID: Date: Wed, 17 Feb 2021 13:08:30 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20210216174146.106639-6-jacopo+renesas@jmondi.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jacopo, On 16/02/2021 17:41, Jacopo Mondi wrote: > The camera module initialization routine does not check the return > value of a few functions. Fix that. > Sounds quite valid to me. Reviewed-by: Kieran Bingham > 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; > > ret = max9271_verify_id(&dev->serializer); > if (ret < 0) >