s390/qeth: remove a redundant check for card->dev
authorJulian Wiedmann <jwi@linux.ibm.com>
Thu, 28 Feb 2019 17:59:40 +0000 (18:59 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 28 Feb 2019 20:55:26 +0000 (12:55 -0800)
smatch complains that __qeth_l3_set_offline() first accesses card->dev,
and then later checks whether the pointer is valid.
Since commit d3d1b205e89f ("s390/qeth: allocate netdevice early"), the
pointer is _always_ valid - that patch merely missed to remove this one
check.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/s390/net/qeth_l3_main.c

index 1381e7e312cd00cc9107b1064700a3e5f346010f..13d77957404c317307984bc99434c6986480579d 100644 (file)
@@ -2414,7 +2414,7 @@ static int __qeth_l3_set_offline(struct ccwgroup_device *cgdev,
        rtnl_unlock();
 
        qeth_l3_stop_card(card);
-       if ((card->options.cq == QETH_CQ_ENABLED) && card->dev) {
+       if (card->options.cq == QETH_CQ_ENABLED) {
                rtnl_lock();
                call_netdevice_notifiers(NETDEV_REBOOT, card->dev);
                rtnl_unlock();