Skip to content

Commit

Permalink
s390/ccwgroup: Drop if with an always false condition
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Uwe Kleine-König authored and Greg Kroah-Hartman committed Jul 21, 2021
1 parent a7bdb9a commit 7a47c52
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/s390/cio/ccwgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 7a47c52

Please sign in to comment.