From: Colin Ian King Date: Fri, 10 Apr 2020 13:50:14 +0000 (+0200) Subject: media: pwc-ctl: remove redundant assignment to variable ret X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=03f56d9952b425df613bb28d52149a52f72e6368;p=linux.git media: pwc-ctl: remove redundant assignment to variable ret The variable ret 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 Reviewed-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/usb/pwc/pwc-ctrl.c b/drivers/media/usb/pwc/pwc-ctrl.c index 315c55927f5c5..cff64d872058d 100644 --- a/drivers/media/usb/pwc/pwc-ctrl.c +++ b/drivers/media/usb/pwc/pwc-ctrl.c @@ -523,7 +523,7 @@ int pwc_set_leds(struct pwc_device *pdev, int on_value, int off_value) #ifdef CONFIG_USB_PWC_DEBUG int pwc_get_cmos_sensor(struct pwc_device *pdev, int *sensor) { - int ret = -1, request; + int ret, request; if (pdev->type < 675) request = SENSOR_TYPE_FORMATTER1;