media: gspca: remove redundant assignment to variable retval
authorColin Ian King <colin.king@canonical.com>
Sun, 24 May 2020 16:25:03 +0000 (18:25 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 23 Jun 2020 11:21:19 +0000 (13:21 +0200)
The variable retval is being initialized with a value that is
never read and it is being updated later with a new value. The
initialization is redundant and can be removed.

Addresses-Coverity: ("Unused value")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/usb/gspca/jl2005bcd.c

index 80ce744..ca12f33 100644 (file)
@@ -165,7 +165,7 @@ static int jl2005c_get_firmware_id(struct gspca_dev *gspca_dev)
 {
        struct sd *sd = (struct sd *)gspca_dev;
        int i = 0;
-       int retval = -1;
+       int retval;
        unsigned char regs_to_read[] = {0x57, 0x02, 0x03, 0x5d, 0x5e, 0x5f};
 
        gspca_dbg(gspca_dev, D_PROBE, "Running jl2005c_get_firmware_id\n");