From patchwork Thu Nov 2 14:11:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandra Diupina X-Patchwork-Id: 160889 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp382563vqu; Thu, 2 Nov 2023 07:12:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFJk4lQicORInNJLrQXps2zVJ1ad2RtWAAHSjWHW+sSHEKxFl5rJfyQV3O8kfvzeE9VRkl0 X-Received: by 2002:a17:902:ec91:b0:1cc:3bfc:69b1 with SMTP id x17-20020a170902ec9100b001cc3bfc69b1mr13195622plg.24.1698934340542; Thu, 02 Nov 2023 07:12:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698934340; cv=none; d=google.com; s=arc-20160816; b=jsJKyQtjjQm0yEhONvykkiGI87lw1q5m9P8699Yrg0D73C9DGrdNkazm1IDzxs2fib 6Cc+euu4yCdsCw3e/1ocjyZwU+LKg252qI89Ehk00RRc62Hef9rBUUBeym5CI28MxK/6 Ja6veT8F8Uw4jnXbWpGTuGBS+b50KJjVe8pZGwCl0O0lUlUWGcNune8ZuGFgiTyxc/Yo /MOgJJhQLV2Jpb1ltTZTqls291OJf+aUuKdl1O2wdW35D0ZsMCVo0vc1+fNpVb0juiWk X1w4lddDVRtxvEhGLnHn6gSmKdwDAeaGBQIOo0ikLQ5k4SDKmV/fyyxCIsw6ergbjvX+ 5ONw== 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 :message-id:date:subject:cc:to:from; bh=fdSCpCIgero5ToByGqUdJF61XPoot/le5ORJi5RCaJQ=; fh=Zl+v2JKDthIZHhHASuByBDqtjfYiGnx3GOhbpDE1n8A=; b=TBlqqmCdZBf22oxFiJ9XRmX3HmU0ErjAiT09CPp+rOW7AdngbO2Zm2He4LDuA4MNQX giv7xnzulwYGmtIjYpQNThAMPjLaBBXHnsmDcf95axAB3XbY4bmvq2C6BSE7gW8cvdqc n7TRBb0Y+iEf/t+1QhbatUwIrc/m44v63FjYm/RnwLQbdIYURxtQUnyTL3/1IXfVHXYn P1X2gik5YXCiCg6CEO9rX9wtJHKTtCOBenT36uSSSiv3V6c2o3DR3qkHVikt3eP1iamJ yBppo+JvTG+71xD505Xc4gqXUorXxn9rtQqZKS2XpVIC6mFVf5WxlJWPYxQ5n31AVMzf 6CSQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id d2-20020a170902cec200b001cc5d28bb2csi5242384plg.151.2023.11.02.07.12.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 07:12:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id E1535822D0A0; Thu, 2 Nov 2023 07:12:07 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376772AbjKBOMD (ORCPT + 36 others); Thu, 2 Nov 2023 10:12:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234984AbjKBOL6 (ORCPT ); Thu, 2 Nov 2023 10:11:58 -0400 Received: from mail.astralinux.ru (mail.astralinux.ru [217.74.38.119]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0642EB7; Thu, 2 Nov 2023 07:11:52 -0700 (PDT) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.astralinux.ru (Postfix) with ESMTP id 92E0C186AD7F; Thu, 2 Nov 2023 17:11:47 +0300 (MSK) Received: from mail.astralinux.ru ([127.0.0.1]) by localhost (rbta-msk-vsrv-mail01.astralinux.ru [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id Fb5gFKlPjCnD; Thu, 2 Nov 2023 17:11:47 +0300 (MSK) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.astralinux.ru (Postfix) with ESMTP id 2C2A6186AD7D; Thu, 2 Nov 2023 17:11:47 +0300 (MSK) X-Virus-Scanned: amavisd-new at astralinux.ru Received: from mail.astralinux.ru ([127.0.0.1]) by localhost (rbta-msk-vsrv-mail01.astralinux.ru [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id NxnAeH7SuxPo; Thu, 2 Nov 2023 17:11:47 +0300 (MSK) Received: from rbta-msk-lt-302690.astralinux.ru (unknown [10.177.237.131]) by mail.astralinux.ru (Postfix) with ESMTPSA id C627C186AD74; Thu, 2 Nov 2023 17:11:45 +0300 (MSK) From: Alexandra Diupina To: Hans de Goede Cc: Alexandra Diupina , Mauro Carvalho Chehab , Sakari Ailus , Greg Kroah-Hartman , Andy Shevchenko , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-media@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org Subject: [PATCH 1/4] Remove redundant return value check Date: Thu, 2 Nov 2023 17:11:32 +0300 Message-Id: <20231102141135.369-1-adiupina@astralinux.ru> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 02 Nov 2023 07:12:07 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781461764372167446 X-GMAIL-MSGID: 1781461774947345223 media_entity_pads_init() will not return 0 only if the 2nd parameter >= MEDIA_ENTITY_MAX_PADS (512), but 1 is passed, so checking the return value is redundant Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: ad85094b293e ("Revert "media: staging: atomisp: Remove driver"") Signed-off-by: Alexandra Diupina --- drivers/staging/media/atomisp/i2c/atomisp-gc2235.c | 4 +--- drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c | 6 +----- drivers/staging/media/atomisp/i2c/atomisp-ov2722.c | 2 -- drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c | 2 -- 4 files changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c b/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c index 9fa390fbc5f3..f10931a03285 100644 --- a/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c +++ b/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c @@ -840,9 +840,7 @@ static int gc2235_probe(struct i2c_client *client) dev->ctrl_handler.lock = &dev->input_lock; dev->sd.ctrl_handler = &dev->ctrl_handler; - ret = media_entity_pads_init(&dev->sd.entity, 1, &dev->pad); - if (ret) - gc2235_remove(client); + media_entity_pads_init(&dev->sd.entity, 1, &dev->pad); return atomisp_register_i2c_module(&dev->sd, gcpdev, RAW_CAMERA); diff --git a/drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c b/drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c index 1c6643c442ef..b7a940fdbd0a 100644 --- a/drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c +++ b/drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c @@ -1581,11 +1581,7 @@ static int mt9m114_probe(struct i2c_client *client) /* REVISIT: Do we need media controller? */ ret = media_entity_pads_init(&dev->sd.entity, 1, &dev->pad); - if (ret) { - mt9m114_remove(client); - return ret; - } - return 0; + return ret; } static const struct acpi_device_id mt9m114_acpi_match[] = { diff --git a/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c b/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c index 6a72691ed5b7..922774293bf4 100644 --- a/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c +++ b/drivers/staging/media/atomisp/i2c/atomisp-ov2722.c @@ -993,8 +993,6 @@ static int ov2722_probe(struct i2c_client *client) dev->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR; ret = media_entity_pads_init(&dev->sd.entity, 1, &dev->pad); - if (ret) - ov2722_remove(client); return atomisp_register_i2c_module(&dev->sd, ovpdev, RAW_CAMERA); diff --git a/drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c b/drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c index 460a4e34c55b..8d5b74fb5d9c 100644 --- a/drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c +++ b/drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c @@ -1733,8 +1733,6 @@ static int ov5693_probe(struct i2c_client *client) dev->sd.ctrl_handler = &dev->ctrl_handler; ret = media_entity_pads_init(&dev->sd.entity, 1, &dev->pad); - if (ret) - ov5693_remove(client); return ret; out_free: From patchwork Thu Nov 2 14:11:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandra Diupina X-Patchwork-Id: 160888 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp382453vqu; Thu, 2 Nov 2023 07:12:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE80eVzOeho4fFQ0bz73K5NrVgCek/EiWkdvQwIYBJxq7FHtllGy8rWDPxMMV9/Mq9LtR0M X-Received: by 2002:a05:6870:13c6:b0:1ea:2c8b:e18b with SMTP id 6-20020a05687013c600b001ea2c8be18bmr18793212oat.35.1698934329972; Thu, 02 Nov 2023 07:12:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698934329; cv=none; d=google.com; s=arc-20160816; b=GbBA1HeRW0Qoy39jyKwZDrTdT82LodYBf5Ba/pLRyv1SSjDxWBtY2d0ruwkgUdR1de SqXnYay3V4qL+3mf6HYpJcBBGP+sy1FuGG4SkPPLVj5n902L0qlK6qcDGs64tEKtqZPV 9ICfbeRG/Rm/ZXZWTH/THptKoY7pxRpLnTGn5jk7/GBUcahj7aJGVdB/H6xP/1EY7CEw CcHCRKg4NvVtXxaMRMIPMT/8E0/+JoGaEg3cfXmiu9FsYrkHvrwojBSAm8NtM8xQ6+c0 mxRI1kzK3J7qRrdpGxegaY2vx2KQ8OJEdgkAn+lQmSM9RgQNAJE+lSZTY3QB4GhAd8Ce Dmkw== 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=NzIUDa6KPLIuUvpKdZyin6WE2LCUY+xnYE5ed3S+G04=; fh=0J6efGmF/A/fDfncUUE/L1ZlTwOK8RkuxnYEmb9gmcI=; b=XzPL0tJ+d4QsVIYB59BhBGM9xT599aB09WbYqd/4FIXr5q5ptseDrc7cG7h9aNvRwy tuGlTGJSeTUP+vYtsdAlhMdnJVSkqsEbNB4pkXQ0jk5hGJxsDOQFAjOi2y84rVAVXYu5 TFtkzafXuq54/tqX4nXyUJHDEd8ODV8DFl5jVJKF3VRrxRj+E5WTEKBlfJCqplVD1T2V eQvdiDP14IZLNbCiO9usFvPLbpmv1OOOFQBGp5sE9mbegULlAu9FGdka2YsfO7lvmqJW PAZmt2zzJGqBrPTICDWNZB5AESYBpnJHbWwiCp/MMBSWXtCK24jm+fy+CFYbMXoU2D/k S70w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id a15-20020a65604f000000b005b8ddb9c305si1980553pgp.30.2023.11.02.07.12.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 07:12:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id E3597822D034; Thu, 2 Nov 2023 07:12:03 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376762AbjKBOMB (ORCPT + 36 others); Thu, 2 Nov 2023 10:12:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230024AbjKBOL6 (ORCPT ); Thu, 2 Nov 2023 10:11:58 -0400 Received: from mail.astralinux.ru (mail.astralinux.ru [217.74.38.119]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12FA2130; Thu, 2 Nov 2023 07:11:53 -0700 (PDT) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.astralinux.ru (Postfix) with ESMTP id 85B50186AD92; Thu, 2 Nov 2023 17:11:50 +0300 (MSK) Received: from mail.astralinux.ru ([127.0.0.1]) by localhost (rbta-msk-vsrv-mail01.astralinux.ru [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 360raSQFcQ7t; Thu, 2 Nov 2023 17:11:50 +0300 (MSK) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.astralinux.ru (Postfix) with ESMTP id 2C583186AD72; Thu, 2 Nov 2023 17:11:50 +0300 (MSK) X-Virus-Scanned: amavisd-new at astralinux.ru Received: from mail.astralinux.ru ([127.0.0.1]) by localhost (rbta-msk-vsrv-mail01.astralinux.ru [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id g0_ELJrllrsB; Thu, 2 Nov 2023 17:11:50 +0300 (MSK) Received: from rbta-msk-lt-302690.astralinux.ru (unknown [10.177.237.131]) by mail.astralinux.ru (Postfix) with ESMTPSA id 42ED2186AD74; Thu, 2 Nov 2023 17:11:47 +0300 (MSK) From: Alexandra Diupina To: Jacopo Mondi Cc: Alexandra Diupina , Kieran Bingham , Laurent Pinchart , =?utf-8?q?Nik?= =?utf-8?q?las_S=C3=B6derlund?= , Mauro Carvalho Chehab , Hans de Goede , Sakari Ailus , Greg Kroah-Hartman , Andy Shevchenko , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Rob Herring , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev, lvc-project@linuxtesting.org Subject: [PATCH 2/4] Remove redundant return value check Date: Thu, 2 Nov 2023 17:11:33 +0300 Message-Id: <20231102141135.369-2-adiupina@astralinux.ru> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20231102141135.369-1-adiupina@astralinux.ru> References: <20231102141135.369-1-adiupina@astralinux.ru> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 02 Nov 2023 07:12:04 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781461764372167446 X-GMAIL-MSGID: 1781461764372167446 media_entity_pads_init() will not return 0 only if the 2nd parameter >= MEDIA_ENTITY_MAX_PADS (512), but 1 is passed, so checking the return value is redundant Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 34009bffc1c6 ("media: i2c: Add RDACM20 driver") Signed-off-by: Alexandra Diupina --- drivers/media/i2c/rdacm20.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/media/i2c/rdacm20.c b/drivers/media/i2c/rdacm20.c index f4e2e2f3972a..ed249ade54e0 100644 --- a/drivers/media/i2c/rdacm20.c +++ b/drivers/media/i2c/rdacm20.c @@ -611,9 +611,7 @@ static int rdacm20_probe(struct i2c_client *client) dev->pad.flags = MEDIA_PAD_FL_SOURCE; dev->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR; - ret = media_entity_pads_init(&dev->sd.entity, 1, &dev->pad); - if (ret < 0) - goto error_free_ctrls; + media_entity_pads_init(&dev->sd.entity, 1, &dev->pad); ret = v4l2_async_register_subdev(&dev->sd); if (ret) From patchwork Thu Nov 2 14:11:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandra Diupina X-Patchwork-Id: 160891 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp382669vqu; Thu, 2 Nov 2023 07:12:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH6Y91dDPL3ij9njOiP5B7Zy1nTA6WdyWrjZRkdm2LSyLKPcwvURXczzrF1Qhs8LKNeRsgF X-Received: by 2002:a05:6a00:2d9d:b0:6b1:b5c4:a8b0 with SMTP id fb29-20020a056a002d9d00b006b1b5c4a8b0mr22986678pfb.23.1698934349802; Thu, 02 Nov 2023 07:12:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698934349; cv=none; d=google.com; s=arc-20160816; b=KIK1OiO2uykUgksyKf5V3ui1/xInbWbg9KCe2YsTUI4WjImiSosF/zq3t26G6wGOg5 I++G+RUcxvAzmsSQAirhJ+Q54bH0wtThhcflgwrq2NRKqxz8hbLbjKakRgjF/XHRae41 a8af8qne/FnKj+xARegfLoLnPQeT7VuszmJe9m8DUQtsTQTUM9B4L+T/4Icd9U6nsAkX wLE8PaZshExWsyfpWhwf7BsAn56C+MKN80HkC+reJ+RbkEBcg996ZdhZTN9inHfgnkte NpftCb37MOMSPG5V10HTJ5ajjXXgd6CoF0bNA3noumep9xY+IrOhTFCZfdytDJNmwV65 0muA== 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=StJiTAZlrY7UCi1+NS82dyOmR+Z7VpSw4C26d1d76Cc=; fh=ONC9axSDEzuMyziczVAyszsbHZaBcdsh8QWc22JSQtM=; b=Rn3f3D+cnVUVUuEC2Vxa7UeIwRK2Xuk9vI7ZPwEWmkfBsTA1dGKyWcHgaqlCYj/dM3 jn8kfSzcxrzRXxKAgkD270dorzfSC0L9zdebmPBVJPf2wATZgco18Q/Ddl7ePNBYzu80 L5dyM+qmj/IZVCFs2ufckhJeP/yWLN5z27CjPDWr8iTjy7qOQ8Obg91FsDQXcPlNDT4H j81i4y7RQKYoQtPqGuw9jvR78C+GDuwuFvM+IWm4HfTqC6Ynt7cUkZkRhAmPgpykAmV5 ObH/ia11ThSSBj5GJ5Qrijsqq+/5G7TygzeDxamghOJm+LcTGCPI8SLWKcQ3ueajJhlK zr8Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id k11-20020aa7820b000000b006c128a7f813si3456503pfi.177.2023.11.02.07.12.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 07:12:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id C8C3A822D122; Thu, 2 Nov 2023 07:12:10 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376781AbjKBOMH (ORCPT + 36 others); Thu, 2 Nov 2023 10:12:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235261AbjKBOL6 (ORCPT ); Thu, 2 Nov 2023 10:11:58 -0400 Received: from mail.astralinux.ru (mail.astralinux.ru [217.74.38.119]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A56A181; Thu, 2 Nov 2023 07:11:56 -0700 (PDT) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.astralinux.ru (Postfix) with ESMTP id 4B312186ADA3; Thu, 2 Nov 2023 17:11:54 +0300 (MSK) Received: from mail.astralinux.ru ([127.0.0.1]) by localhost (rbta-msk-vsrv-mail01.astralinux.ru [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id osod0Jzcpdur; Thu, 2 Nov 2023 17:11:52 +0300 (MSK) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.astralinux.ru (Postfix) with ESMTP id D4C7C186AD74; Thu, 2 Nov 2023 17:11:51 +0300 (MSK) X-Virus-Scanned: amavisd-new at astralinux.ru Received: from mail.astralinux.ru ([127.0.0.1]) by localhost (rbta-msk-vsrv-mail01.astralinux.ru [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 8K7SQe3qp8h8; Thu, 2 Nov 2023 17:11:51 +0300 (MSK) Received: from rbta-msk-lt-302690.astralinux.ru (unknown [10.177.237.131]) by mail.astralinux.ru (Postfix) with ESMTPSA id 575CE186AD85; Thu, 2 Nov 2023 17:11:50 +0300 (MSK) From: Alexandra Diupina To: Jacopo Mondi Cc: Alexandra Diupina , Kieran Bingham , Laurent Pinchart , =?utf-8?q?Nik?= =?utf-8?q?las_S=C3=B6derlund?= , Mauro Carvalho Chehab , Sakari Ailus , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org Subject: [PATCH 3/4] Remove redundant return value check Date: Thu, 2 Nov 2023 17:11:34 +0300 Message-Id: <20231102141135.369-3-adiupina@astralinux.ru> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20231102141135.369-1-adiupina@astralinux.ru> References: <20231102141135.369-1-adiupina@astralinux.ru> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 02 Nov 2023 07:12:10 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781461764372167446 X-GMAIL-MSGID: 1781461784322284391 media_entity_pads_init() will not return 0 only if the 2nd parameter >= MEDIA_ENTITY_MAX_PADS (512), but 1 is passed, so checking the return value is redundant Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: a59f853b3b4b ("media: i2c: Add driver for RDACM21 camera module") Signed-off-by: Alexandra Diupina --- drivers/media/i2c/rdacm21.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/media/i2c/rdacm21.c b/drivers/media/i2c/rdacm21.c index 3e22df36354f..168d28073760 100644 --- a/drivers/media/i2c/rdacm21.c +++ b/drivers/media/i2c/rdacm21.c @@ -583,9 +583,7 @@ static int rdacm21_probe(struct i2c_client *client) dev->pad.flags = MEDIA_PAD_FL_SOURCE; dev->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR; - ret = media_entity_pads_init(&dev->sd.entity, 1, &dev->pad); - if (ret < 0) - goto error_free_ctrls; + media_entity_pads_init(&dev->sd.entity, 1, &dev->pad); ret = v4l2_async_register_subdev(&dev->sd); if (ret) From patchwork Thu Nov 2 14:11:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandra Diupina X-Patchwork-Id: 160890 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp382651vqu; Thu, 2 Nov 2023 07:12:29 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEb1ziyHza5gSoZ+j69ufdO1CkOqz/kqc/0SJV4P/DuHl6rscVAwJBOgoD0l6QoQzHw7iUU X-Received: by 2002:a17:902:f94f:b0:1cc:3be6:b714 with SMTP id kx15-20020a170902f94f00b001cc3be6b714mr11956914plb.23.1698934348957; Thu, 02 Nov 2023 07:12:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698934348; cv=none; d=google.com; s=arc-20160816; b=Xb0phGfYbNTg/nM1znISpr6VSfGY97FM3mwTmzkNPGib+Zdaq48gSlxVYNpgEbqGyf DO/ed1wHEV34SmrHmfoo4vxBpy6waw8B31YompctQ4JcEbD2D3tUWnTCWdpBflMUgfFJ WcMzagAuR7YtXfNamwq6unW0Eojpwsp3JNPOr8HaOCDYEgXmHVhTAvpbMQUBWp4aUy1c UFgaP0trBj4kZragKuxSkRIfEtKI0fptsqHvZ1j0v9V44i5E9QSgJJmgg8wHSJ8POZUY aWZe8O6AKkPWn7DPX3PEzJ6AMYnGvH8NdszbMRT2T/bhetjIQH8j7Nvi2warTHBY90Yv U1iw== 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=kYXiK/2monBzeWiSDJ56zmLEIWPA6s7CFZSCiCRlbFY=; fh=1Cbc0rhjwaAf/ZYg/W1eU1k0M7CFrQPZcQfOVlaXlRc=; b=NaCJhiCmolQWAS7gEGz6fF5gw/Jlk+kUQX/hYzE9PA8qa+/jLAUPsK8atjpQj9D8og GzY9lgVx7mvC4goM66LNde3CHK8iFc5qig0NB1YRxWREIeG/3oM69UCA5BQ6WN1udRw2 pVzPgSxbNHMps2hedRz+fyYk7ZyH1SANwC5KA7mjpBTYyW9liHy75FQEBE9cRroi/ur+ iWw3zuYVhPFK56asPYHOKSfF8wkLvSEsUS0Q30I3mycNok5brf7CSFx+mCHKasXCRDW/ O6Vg+1KK0kRjIY+dC3L2Y+1I8O/OFmZ8WY2qzi5B0uGYlZtdDpcx1mQmopKEMjbOagQo gn1w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id h21-20020a170902f7d500b001cc2216e87bsi4832300plw.351.2023.11.02.07.12.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 07:12:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 9254C822D101; Thu, 2 Nov 2023 07:12:10 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376774AbjKBOME (ORCPT + 36 others); Thu, 2 Nov 2023 10:12:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235250AbjKBOL6 (ORCPT ); Thu, 2 Nov 2023 10:11:58 -0400 Received: from mail.astralinux.ru (mail.astralinux.ru [217.74.38.119]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B922C12E; Thu, 2 Nov 2023 07:11:55 -0700 (PDT) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.astralinux.ru (Postfix) with ESMTP id 2F84A186AD7D; Thu, 2 Nov 2023 17:11:54 +0300 (MSK) Received: from mail.astralinux.ru ([127.0.0.1]) by localhost (rbta-msk-vsrv-mail01.astralinux.ru [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id Mit1H4cav2aX; Thu, 2 Nov 2023 17:11:53 +0300 (MSK) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.astralinux.ru (Postfix) with ESMTP id D32D0186AD9B; Thu, 2 Nov 2023 17:11:53 +0300 (MSK) X-Virus-Scanned: amavisd-new at astralinux.ru Received: from mail.astralinux.ru ([127.0.0.1]) by localhost (rbta-msk-vsrv-mail01.astralinux.ru [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id CEjmqHfM5iRG; Thu, 2 Nov 2023 17:11:53 +0300 (MSK) Received: from rbta-msk-lt-302690.astralinux.ru (unknown [10.177.237.131]) by mail.astralinux.ru (Postfix) with ESMTPSA id E2B80186AD86; Thu, 2 Nov 2023 17:11:51 +0300 (MSK) From: Alexandra Diupina To: Jacopo Mondi Cc: Alexandra Diupina , Kieran Bingham , Laurent Pinchart , =?utf-8?q?Nik?= =?utf-8?q?las_S=C3=B6derlund?= , Mauro Carvalho Chehab , Hans de Goede , Sakari Ailus , Greg Kroah-Hartman , Andy Shevchenko , =?utf-8?q?Uwe_Kleine-K=C3=B6ni?= =?utf-8?q?g?= , Rob Herring , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev, lvc-project@linuxtesting.org Subject: [PATCH 4/4] Remove redundant return value check Date: Thu, 2 Nov 2023 17:11:35 +0300 Message-Id: <20231102141135.369-4-adiupina@astralinux.ru> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20231102141135.369-1-adiupina@astralinux.ru> References: <20231102141135.369-1-adiupina@astralinux.ru> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 02 Nov 2023 07:12:10 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781461764372167446 X-GMAIL-MSGID: 1781461784056911255 media_entity_pads_init() will not return 0 only if the 2nd parameter >= MEDIA_ENTITY_MAX_PADS (512), but 1 is passed, so checking the return value is redundant Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 2ec5bfe0c24a ("media: atomisp: gc0310: Switch over to ACPI powermanagement") Signed-off-by: Alexandra Diupina --- drivers/staging/media/atomisp/i2c/atomisp-gc0310.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c b/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c index 9a11793f34f7..62550504b68c 100644 --- a/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c +++ b/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c @@ -660,11 +660,7 @@ static int gc0310_probe(struct i2c_client *client) return ret; } - ret = media_entity_pads_init(&dev->sd.entity, 1, &dev->pad); - if (ret) { - gc0310_remove(client); - return ret; - } + media_entity_pads_init(&dev->sd.entity, 1, &dev->pad); ret = v4l2_async_register_subdev_sensor(&dev->sd); if (ret) {