diff options
author | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-10-07 16:41:13 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-10-14 17:52:31 +0200 |
commit | 11a1e0ed7908f04c896e69d0eb65e478c12f8519 (patch) | |
tree | 71fe5ec4889ed244b9bb06802f585f2debd91808 /drivers/media/usb/dvb-usb/dvb-usb.h | |
parent | [media] pctv452e: fix semicolon.cocci warnings (diff) | |
download | linux-11a1e0ed7908f04c896e69d0eb65e478c12f8519.tar.xz linux-11a1e0ed7908f04c896e69d0eb65e478c12f8519.zip |
[media] dvb-usb: warn if return value for USB read/write routines is not checked
the return values for dvb_usb_generic_rw() and dvb_usb_generic_write()
should be checked, as otherwise the drivers won't be doing the right
thing in the case of errors.
So, add __must_check to both declarations.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/usb/dvb-usb/dvb-usb.h')
-rw-r--r-- | drivers/media/usb/dvb-usb/dvb-usb.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/usb/dvb-usb/dvb-usb.h b/drivers/media/usb/dvb-usb/dvb-usb.h index 639c4678c65b..1448c3d27ea2 100644 --- a/drivers/media/usb/dvb-usb/dvb-usb.h +++ b/drivers/media/usb/dvb-usb/dvb-usb.h @@ -462,8 +462,10 @@ extern int dvb_usb_device_init(struct usb_interface *, extern void dvb_usb_device_exit(struct usb_interface *); /* the generic read/write method for device control */ -extern int dvb_usb_generic_rw(struct dvb_usb_device *, u8 *, u16, u8 *, u16,int); -extern int dvb_usb_generic_write(struct dvb_usb_device *, u8 *, u16); +extern int __must_check +dvb_usb_generic_rw(struct dvb_usb_device *, u8 *, u16, u8 *, u16, int); +extern int __must_check +dvb_usb_generic_write(struct dvb_usb_device *, u8 *, u16); /* commonly used remote control parsing */ extern int dvb_usb_nec_rc_key_to_event(struct dvb_usb_device *, u8[], u32 *, int *); |