net: huawei_cdc_ncm: remove redundant assignment to variable ret
authorColin Ian King <colin.king@canonical.com>
Sat, 9 May 2020 21:48:03 +0000 (22:48 +0100)
committerJakub Kicinski <kuba@kernel.org>
Sun, 10 May 2020 18:13:07 +0000 (11:13 -0700)
The variable ret is being initializeed with a value that is never read
and it is being updated later with a new value. The initialization
is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/usb/huawei_cdc_ncm.c

index 099d848..a87f0da 100644 (file)
@@ -67,7 +67,7 @@ static int huawei_cdc_ncm_bind(struct usbnet *usbnet_dev,
 {
        struct cdc_ncm_ctx *ctx;
        struct usb_driver *subdriver = ERR_PTR(-ENODEV);
-       int ret = -ENODEV;
+       int ret;
        struct huawei_cdc_ncm_state *drvstate = (void *)&usbnet_dev->data;
        int drvflags = 0;