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)