All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexandra Diupina <adiupina@astralinux.ru>
To: Jacopo Mondi <jacopo+renesas@jmondi.org>
Cc: "Alexandra Diupina" <adiupina@astralinux.ru>,
	"Kieran Bingham" <kieran.bingham+renesas@ideasonboard.com>,
	"Laurent Pinchart" <laurent.pinchart+renesas@ideasonboard.com>,
	"Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>,
	"Mauro Carvalho Chehab" <mchehab@kernel.org>,
	"Hans de Goede" <hdegoede@redhat.com>,
	"Sakari Ailus" <sakari.ailus@linux.intel.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Andy Shevchenko" <andy@kernel.org>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"Rob Herring" <robh@kernel.org>,
	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	[thread overview]
Message-ID: <20231102141135.369-2-adiupina@astralinux.ru> (raw)
In-Reply-To: <20231102141135.369-1-adiupina@astralinux.ru>

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 <adiupina@astralinux.ru>
---
 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)
-- 
2.30.2


  reply	other threads:[~2023-11-02 14:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-02 14:11 [PATCH 1/4] Remove redundant return value check Alexandra Diupina
2023-11-02 14:11 ` Alexandra Diupina [this message]
2023-11-02 14:55   ` [PATCH 2/4] " Jacopo Mondi
2023-11-02 15:38   ` Laurent Pinchart
2023-11-02 14:11 ` [PATCH 3/4] " Alexandra Diupina
2023-11-02 14:11 ` [PATCH 4/4] " Alexandra Diupina
2023-11-02 14:21 ` [PATCH 1/4] " Hans de Goede
2023-11-02 15:09   ` Sakari Ailus
2023-11-02 14:31 ` Dan Carpenter
2023-11-02 14:35 ` Dan Carpenter
2023-11-02 14:37   ` Hans de Goede
2023-11-02 15:46 ` Uwe Kleine-König

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231102141135.369-2-adiupina@astralinux.ru \
    --to=adiupina@astralinux.ru \
    --cc=andy@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hdegoede@redhat.com \
    --cc=jacopo+renesas@jmondi.org \
    --cc=kieran.bingham+renesas@ideasonboard.com \
    --cc=laurent.pinchart+renesas@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=lvc-project@linuxtesting.org \
    --cc=mchehab@kernel.org \
    --cc=niklas.soderlund+renesas@ragnatech.se \
    --cc=robh@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=u.kleine-koenig@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.