[4/4] Remove redundant return value check
Commit Message
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@astralinux.ru>
---
drivers/staging/media/atomisp/i2c/atomisp-gc0310.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
@@ -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) {