diff options
author | Alexander Usyskin <alexander.usyskin@intel.com> | 2023-05-22 13:12:09 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-05-29 15:05:17 +0100 |
commit | 783aa47033a22cad9ed7ffdbb337dcfbf7acc65b (patch) | |
tree | c1d5a2e09468b22c1bbad240e0189a62adb98f1c /drivers/misc/mei/bus.c | |
parent | 128f20c018661439dca8afa523ac066e1a4210ad (diff) |
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: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Link: https://lore.kernel.org/r/20230522101210.2207395-1-tomas.winkler@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mei/bus.c')
-rw-r--r-- | drivers/misc/mei/bus.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/drivers/misc/mei/bus.c b/drivers/misc/mei/bus.c index 5d7a68674d9b..33ec6424dfee 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); |