]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
staging: wilc1000: Remove unnecessary pointer check
authorNathan Chancellor <natechancellor@gmail.com>
Thu, 20 Sep 2018 21:26:49 +0000 (14:26 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 25 Sep 2018 18:53:53 +0000 (20:53 +0200)
Clang warns that the address of a pointer will always evaluated as true
in a boolean context:

drivers/staging/wilc1000/linux_wlan.c:267:20: warning: address of
'vif->ndev->dev' will always evaluate to 'true'
[-Wpointer-bool-conversion]
        if (!(&vif->ndev->dev))
            ~  ~~~~~~~~~~~^~~
1 warning generated.

Since this statement always evaluates to false due to the logical not,
remove it.

Link: https://github.com/ClangBuiltLinux/linux/issues/121
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/linux_wlan.c

index 49afda669393c3a14b836c9a39563fb66814c318..323593440e40beaf1aba6e0453badc1eb6a4a055 100644 (file)
@@ -264,9 +264,6 @@ static int wilc_wlan_get_firmware(struct net_device *dev)
 
        netdev_info(dev, "loading firmware %s\n", firmware);
 
-       if (!(&vif->ndev->dev))
-               goto fail;
-
        if (request_firmware(&wilc_firmware, firmware, wilc->dev) != 0) {
                netdev_err(dev, "%s - firmware not available\n", firmware);
                ret = -1;