Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1230384pxb; Sun, 21 Feb 2021 17:11:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJxtVAqhOBoCstPAVU3xkirve6Z+er1Tc79BL2cY61FP+Y3xcpRnZbQZnBe250Jr3FSEGTrh X-Received: by 2002:a17:907:94d4:: with SMTP id dn20mr18862553ejc.397.1613956297035; Sun, 21 Feb 2021 17:11:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613956297; cv=none; d=google.com; s=arc-20160816; b=BjleE8imCHkcO2UzwKJXQmC212dvYNjKdHJ6VkOfGnzh75miPtMlHF7gvuQqPNPnLR xwDHWycQBS1IlKgwZIezZZf6jqbUaqo2Ml54REvqTk0Mn4P03+D5y+sl4wbItMiaoG9e AX/7ZO26caH7iY7CwUg7/otEL3BDmbTWYW39cdoZmfG3wz4sqJuCwVdxlwjtUdbDML9+ +/7lcatqk/MANSLChr7Zbk2/krX21xVpAkzEMzd07TJNZFHiJjd8SLr2nam6nP6U2mDV zG1dQJn5bdopzhpLUyVQpISwnY/vs8RM0Co6r2O/Q0uHjhsgu37oIiqg9RwngUp0ywz4 GYmw== 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:dkim-signature; bh=+vt1QWsgU6rfTe08463nDopTCE2lq39HuRbRJwywq/8=; b=Ew33ae/L0gzy5F9+Rj3xBYkInBtwLLAr1HMgyFubv7PrObJ+IlXcee5ltweZHyuOeA QOsX6NhFnzhcVwUAZONn6i9y+zN5+vNLWdPpBKtMX0aHGHO/XO9dYZEN2JhQPgG70kmD UkIsYILMpJbarLOZSJoVTxK3nL0bduYAv6yoiQTMZ6puAmtwpWQQE7ZTp2mvvXgk649q RbIxo3Xz6CUPaiBmjgZnBv0hYxGyUuQ/+Bb1Tm6K3AbB3NU8iUopqopCAK2Adt+5COaP 3Oj/VE6tPZzmsxNqqvj+pOUuQrSZ7VubfbMnCmwZsL3Xb0ZUE6azFzdzKmIQBqaQ7Rbq jePA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b="QoA/kbaV"; 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 q18si11656635edd.608.2021.02.21.17.11.14; Sun, 21 Feb 2021 17:11:37 -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="QoA/kbaV"; 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 S229934AbhBVBKf (ORCPT + 99 others); Sun, 21 Feb 2021 20:10:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229866AbhBVBKe (ORCPT ); Sun, 21 Feb 2021 20:10:34 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E785C061574; Sun, 21 Feb 2021 17:09:54 -0800 (PST) Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 8CA5E517; Mon, 22 Feb 2021 02:09:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1613956192; bh=xhnHSB0XbiYzNW1xDqCxM9Uy6dA62lkumHVq0f5L/KE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=QoA/kbaVUsgw7GQwn/yj3mL2GecM1ooNHE9d6fwHp2lY47FsCm2Hb6zHJF4QQ4U81 ILdYw7d6XoIaRuM/1cCRtN0PDQhUm0wwHKM76NI86yHWL8U3lZz7vXySCKiKvz7ckB B1bPCaA/MVXtR8Tc383yy4zlon4qnRZ8Z3ab3hTs= Date: Mon, 22 Feb 2021 03:09:26 +0200 From: Laurent Pinchart To: Jacopo Mondi Cc: 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: 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: <20210216174146.106639-6-jacopo+renesas@jmondi.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 :-) > > ret = max9271_verify_id(&dev->serializer); > if (ret < 0) -- Regards, Laurent Pinchart