[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20231102141135.369-4-adiupina@astralinux.ru>
Date: Thu, 2 Nov 2023 17:11:35 +0300
From: Alexandra Diupina <adiupina@...ralinux.ru>
To: Jacopo Mondi <jacopo+renesas@...ndi.org>
Cc: Alexandra Diupina <adiupina@...ralinux.ru>,
Kieran Bingham <kieran.bingham+renesas@...asonboard.com>,
Laurent Pinchart <laurent.pinchart+renesas@...asonboard.com>,
Niklas Söderlund
<niklas.soderlund+renesas@...natech.se>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Hans de Goede <hdegoede@...hat.com>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Andy Shevchenko <andy.shevchenko@...il.com>,
Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>, Rob Herring <robh@...nel.org>,
linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-staging@...ts.linux.dev, lvc-project@...uxtesting.org
Subject: [PATCH 4/4] Remove redundant return value check
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 <adiupina@...ralinux.ru>
---
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) {
--
2.30.2
Powered by blists - more mailing lists