]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
net: cdc_ncm: cleanup a type issue in cdc_ncm_setup()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 13 Nov 2013 07:42:34 +0000 (10:42 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 14 Nov 2013 08:10:30 +0000 (03:10 -0500)
This is harmless but cdc_ncm_setup() returns negative error codes
truncated to u8 values.  There is only one caller and treats all
non-zero returns as errors but doesn't store the the return code.  So
the code works correctly but it's messy and upsets the static checkers.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/cdc_ncm.c

index f74786aa37be3cca7a4020cc82b08f0777aec4f5..e15ec2b12035aa06b4662c284a7bb3abda148eff 100644 (file)
@@ -66,7 +66,7 @@ static void cdc_ncm_tx_timeout_start(struct cdc_ncm_ctx *ctx);
 static enum hrtimer_restart cdc_ncm_tx_timer_cb(struct hrtimer *hr_timer);
 static struct usb_driver cdc_ncm_driver;
 
-static u8 cdc_ncm_setup(struct usbnet *dev)
+static int cdc_ncm_setup(struct usbnet *dev)
 {
        struct cdc_ncm_ctx *ctx = (struct cdc_ncm_ctx *)dev->data[0];
        struct usb_cdc_ncm_ntb_parameters ncm_parm;