Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp5881265pxb; Tue, 16 Feb 2021 09:46:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJxRw3KUZsDhdq963Fqia51u2VNDJi0ESlucPqHmnqavDV0MfvvqMmYzQvx/LK0LtnX4z82f X-Received: by 2002:a50:f382:: with SMTP id g2mr22217401edm.273.1613497589408; Tue, 16 Feb 2021 09:46:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613497589; cv=none; d=google.com; s=arc-20160816; b=jRQOGpA057IZlWppkZwQuvZzXuGafQA/ti6HMYXekSMxfcHCUfzrwijmyeHji2hDOh 3TnQ+jLmsoF2qlAt/KQjME0K8QmBO0f//TIMFP2QaZsBYXDaWCpykOUPnurwhPbHp6QC mViCkOVnUj7svwJzgBygMwo2E3T33jUw44J6Hbek2YHyiVH9Ryac2SnKSSmGmCMqwqxA +276TLx6B8Nz93CRe5SEPUOLhuaCQdMIUYZNbUbA+unSPOfa0X6KGfgVO9fNGOMTZU/x XJzxdlnxyjMR2CUZabLu7PWTAsdMKNEPA1hH1ZwWuT0WkXZecvw3EQRNroJf+ZdW+pX8 Rbjg== 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=zT9UlPCnMl9n9+iO/DJuI/d5n8F+IYOexjN7GjkaTWA=; b=ns37sGE5AgpraWb18iKNJK9GPkGWEvKujZ4R+Zfzfg+XRaVovuku4HvP0ZJqpsQhzI WkRQ6lcmtCp1HbdIos+Z1wc0EVIbsybriGjrqYc/JjvczwF0/nJVBoL2GftHpMsZWBRG xkUagoXOXa79csIkxn5NCBc5wESo8HHGp2CqKVrntzI2iS5MEhnC549e0mrcVz5ShoeX Rpz50pKYqI41rXUDQCCVMtoRg/m7JNfYsut/Tl7A06m/wjFp31NMuP53Ppyc8Qi0hUfJ Pv5AoB0SFT4sQHqd2ZHF3TMqJZhpyEwDnFhEdnTxYWCt/Opwe/L8w+OhLBOw+QGklL8C F66Q== 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 e1si1771658edy.163.2021.02.16.09.46.06; Tue, 16 Feb 2021 09:46:29 -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 S231251AbhBPRmt (ORCPT + 99 others); Tue, 16 Feb 2021 12:42:49 -0500 Received: from relay12.mail.gandi.net ([217.70.178.232]:44681 "EHLO relay12.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231145AbhBPRmS (ORCPT ); Tue, 16 Feb 2021 12:42:18 -0500 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 5540C200011; Tue, 16 Feb 2021 17:41:35 +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 Subject: [PATCH 05/16] media: i2c: rdacm20: Check return values Date: Tue, 16 Feb 2021 18:41:35 +0100 Message-Id: <20210216174146.106639-6-jacopo+renesas@jmondi.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210216174146.106639-1-jacopo+renesas@jmondi.org> References: <20210216174146.106639-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 --- 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) -- 2.30.0