From: Dan Carpenter Date: Sun, 15 Jan 2012 10:32:19 +0000 (-0300) Subject: [media] tlg2300: fix up check_firmware() return X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=e9ae4d4f028cd9ff9e7d06430cc678d7926df9e0;p=linux-beck.git [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 Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/tlg2300/pd-main.c b/drivers/media/video/tlg2300/pd-main.c index 129f135d5a5f..c096b3f74200 100644 --- a/drivers/media/video/tlg2300/pd-main.c +++ b/drivers/media/video/tlg2300/pd-main.c @@ -374,7 +374,7 @@ static inline void set_map_flags(struct poseidon *pd, struct usb_device *udev) } #endif -static bool check_firmware(struct usb_device *udev, int *down_firmware) +static int check_firmware(struct usb_device *udev, int *down_firmware) { void *buf; int ret; @@ -398,7 +398,7 @@ static bool check_firmware(struct usb_device *udev, int *down_firmware) *down_firmware = 1; return firmware_download(udev); } - return ret; + return 0; } static int poseidon_probe(struct usb_interface *interface,