Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] tlg2300: fix up check_firmware() return

The caller doesn't check the return value of check_firmware() but static
checkers complain. It currently returns negative error codes, or zero
or greater on success but since the return type is boolean the values
are truncated to one or zero. I've changed it to return an int,
negative on error and zero on success.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

authored by

Dan Carpenter and committed by
Mauro Carvalho Chehab
e9ae4d4f 0397e450

+2 -2
+2 -2
drivers/media/video/tlg2300/pd-main.c
··· 374 374 } 375 375 #endif 376 376 377 - static bool check_firmware(struct usb_device *udev, int *down_firmware) 377 + static int check_firmware(struct usb_device *udev, int *down_firmware) 378 378 { 379 379 void *buf; 380 380 int ret; ··· 398 398 *down_firmware = 1; 399 399 return firmware_download(udev); 400 400 } 401 - return ret; 401 + return 0; 402 402 } 403 403 404 404 static int poseidon_probe(struct usb_interface *interface,