s390/ccwgroup: Drop if with an always false condition
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tue, 13 Jul 2021 19:35:20 +0000 (21:35 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Jul 2021 09:53:42 +0000 (11:53 +0200)
The driver core only calls a bus remove callback when there is a driver.
So dev->driver is never NULL and the check can safely be removed.

Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Acked-by: Vineeth Vijayan <vneethv@linux.ibm.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20210713193522.1770306-4-u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/s390/cio/ccwgroup.c

index 9748165e08e9622523579087cec8ff76f697f8ac..a6aeab1ea0ae735cc0f033ae85f8194a3038a868 100644 (file)
@@ -444,8 +444,6 @@ static int ccwgroup_remove(struct device *dev)
        struct ccwgroup_device *gdev = to_ccwgroupdev(dev);
        struct ccwgroup_driver *gdrv = to_ccwgroupdrv(dev->driver);
 
-       if (!dev->driver)
-               return 0;
        if (gdrv->remove)
                gdrv->remove(gdev);