[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210713074014.684791-4-u.kleine-koenig@pengutronix.de>
Date: Tue, 13 Jul 2021 09:40:12 +0200
From: Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: kernel@...gutronix.de,
Christian Borntraeger <borntraeger@...ibm.com>,
Cornelia Huck <cohuck@...hat.com>,
Heiko Carstens <hca@...ux.ibm.com>,
Peter Oberparleiter <oberpar@...ux.ibm.com>,
Vasily Gorbik <gor@...ux.ibm.com>,
Vineeth Vijayan <vneethv@...ux.ibm.com>,
linux-kernel@...r.kernel.org, linux-s390@...r.kernel.org
Subject: [PATCH v3 3/5] s390/ccwgroup: Drop if with an always false condition
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@...hat.com>
Acked-by: Vineeth Vijayan <vneethv@...ux.ibm.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
---
drivers/s390/cio/ccwgroup.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/s390/cio/ccwgroup.c b/drivers/s390/cio/ccwgroup.c
index 9748165e08e9..a6aeab1ea0ae 100644
--- a/drivers/s390/cio/ccwgroup.c
+++ b/drivers/s390/cio/ccwgroup.c
@@ -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);
--
2.30.2
Powered by blists - more mailing lists