staging: wilc1000: remove redundant result < 0 check
authorColin Ian King <colin.king@canonical.com>
Tue, 28 Feb 2017 12:05:48 +0000 (12:05 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Mar 2017 08:17:08 +0000 (09:17 +0100)
The check for result < 0 is redundant because at that point result
is always zero, hence we can remove this check and the netdev_err
message.

Detected by CoverityScan, CID#1357147 ("Logically Dead Code")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/host_interface.c

index c307ccef790eb70f057914e91b9d08301cc31365..c2a3424c35cb2ee0c66bceae1932ec343f9774f8 100644 (file)
@@ -3348,10 +3348,6 @@ int wilc_init(struct net_device *dev, struct host_if_drv **hif_drv_handler)
        init_completion(&hif_drv->comp_inactive_time);
 
        if (clients_count == 0) {
-               if (result < 0) {
-                       netdev_err(vif->ndev, "Failed to creat MQ\n");
-                       goto _fail_;
-               }
                hif_workqueue = create_singlethread_workqueue("WILC_wq");
                if (!hif_workqueue) {
                        netdev_err(vif->ndev, "Failed to create workqueue\n");