Commit 8bdfc47f authored by Nathan Chancellor's avatar Nathan Chancellor Committed by Greg Kroah-Hartman

staging: wilc1000: Remove unnecessary pointer check

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/121Signed-off-by: default avatarNathan Chancellor <natechancellor@gmail.com>
Reviewed-by: default avatarAjay Singh <ajay.kathat@microchip.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8de447ea
...@@ -264,9 +264,6 @@ static int wilc_wlan_get_firmware(struct net_device *dev) ...@@ -264,9 +264,6 @@ static int wilc_wlan_get_firmware(struct net_device *dev)
netdev_info(dev, "loading firmware %s\n", firmware); netdev_info(dev, "loading firmware %s\n", firmware);
if (!(&vif->ndev->dev))
goto fail;
if (request_firmware(&wilc_firmware, firmware, wilc->dev) != 0) { if (request_firmware(&wilc_firmware, firmware, wilc->dev) != 0) {
netdev_err(dev, "%s - firmware not available\n", firmware); netdev_err(dev, "%s - firmware not available\n", firmware);
ret = -1; ret = -1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment