Commit 783aa470 authored by Alexander Usyskin's avatar Alexander Usyskin Committed by Greg Kroah-Hartman

mei: bus: drop useless cldev null check

cldev cannot be NULL when derived with to_mei_cl_device().
Drop useless NULL-checks.
Signed-off-by: default avatarAlexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Link: https://lore.kernel.org/r/20230522101210.2207395-1-tomas.winkler@intel.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 128f20c0
...@@ -1046,9 +1046,6 @@ static int mei_cl_device_match(struct device *dev, struct device_driver *drv) ...@@ -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_driver *cldrv = to_mei_cl_driver(drv);
const struct mei_cl_device_id *found_id; const struct mei_cl_device_id *found_id;
if (!cldev)
return 0;
if (!cldev->do_match) if (!cldev->do_match)
return 0; return 0;
...@@ -1079,9 +1076,6 @@ static int mei_cl_device_probe(struct device *dev) ...@@ -1079,9 +1076,6 @@ static int mei_cl_device_probe(struct device *dev)
cldev = to_mei_cl_device(dev); cldev = to_mei_cl_device(dev);
cldrv = to_mei_cl_driver(dev->driver); cldrv = to_mei_cl_driver(dev->driver);
if (!cldev)
return 0;
if (!cldrv || !cldrv->probe) if (!cldrv || !cldrv->probe)
return -ENODEV; return -ENODEV;
...@@ -1276,9 +1270,6 @@ static void mei_cl_bus_dev_release(struct device *dev) ...@@ -1276,9 +1270,6 @@ static void mei_cl_bus_dev_release(struct device *dev)
{ {
struct mei_cl_device *cldev = to_mei_cl_device(dev); struct mei_cl_device *cldev = to_mei_cl_device(dev);
if (!cldev)
return;
mei_cl_flush_queues(cldev->cl, NULL); mei_cl_flush_queues(cldev->cl, NULL);
mei_me_cl_put(cldev->me_cl); mei_me_cl_put(cldev->me_cl);
mei_dev_bus_put(cldev->bus); mei_dev_bus_put(cldev->bus);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment