mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [char-misc-next 1/2] mei: bus: drop useless cldev null check
@ 2023-05-22 10:12 Tomas Winkler
  2023-05-22 10:12 ` [char-misc-next 2/2] mei: bus-fixup: fix buffer type Tomas Winkler
  0 siblings, 1 reply; 2+ messages in thread
From: Tomas Winkler @ 2023-05-22 10:12 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Alexander Usyskin, Vitaly Lubart, linux-kernel, Tomas Winkler

From: Alexander Usyskin <alexander.usyskin@intel.com>

cldev cannot be NULL when derived with to_mei_cl_device().
Drop useless NULL-checks.

Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
---
 drivers/misc/mei/bus.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/drivers/misc/mei/bus.c b/drivers/misc/mei/bus.c
index 5d7a68674d9b20b32c415fe8..33ec6424dfee25aacd862fd0 100644
--- a/drivers/misc/mei/bus.c
+++ b/drivers/misc/mei/bus.c
@@ -1046,9 +1046,6 @@ static int mei_cl_device_match(struct device *dev, struct device_driver *drv)
 	const struct mei_cl_driver *cldrv = to_mei_cl_driver(drv);
 	const struct mei_cl_device_id *found_id;
 
-	if (!cldev)
-		return 0;
-
 	if (!cldev->do_match)
 		return 0;
 
@@ -1079,9 +1076,6 @@ static int mei_cl_device_probe(struct device *dev)
 	cldev = to_mei_cl_device(dev);
 	cldrv = to_mei_cl_driver(dev->driver);
 
-	if (!cldev)
-		return 0;
-
 	if (!cldrv || !cldrv->probe)
 		return -ENODEV;
 
@@ -1276,9 +1270,6 @@ static void mei_cl_bus_dev_release(struct device *dev)
 {
 	struct mei_cl_device *cldev = to_mei_cl_device(dev);
 
-	if (!cldev)
-		return;
-
 	mei_cl_flush_queues(cldev->cl, NULL);
 	mei_me_cl_put(cldev->me_cl);
 	mei_dev_bus_put(cldev->bus);
-- 
2.40.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-05-22 10:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-22 10:12 [char-misc-next 1/2] mei: bus: drop useless cldev null check Tomas Winkler
2023-05-22 10:12 ` [char-misc-next 2/2] mei: bus-fixup: fix buffer type Tomas Winkler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®