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@xxxxxxxxxxxxx> --- 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