Skip to content

Commit

Permalink
[media] tlg2300: fix up check_firmware() return
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and Mauro Carvalho Chehab committed Jan 16, 2012
1 parent 0397e45 commit e9ae4d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/media/video/tlg2300/pd-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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,
Expand Down

0 comments on commit e9ae4d4

Please sign in to comment.