Commit ae128916 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Greg Kroah-Hartman

intel_th: Remove an unused exit point from intel_th_remove()

As described in the added comment device_for_each_child() never returns
a non-zero value. So remove the corresponding error check.

This simplifies the quest to make struct bus_type::remove() return void.
Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarAlexander Shishkin <alexander.shishkin@linux.intel.com>
Link: https://lore.kernel.org/r/20210621151246.31891-3-alexander.shishkin@linux.intel.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d0b371e5
...@@ -100,16 +100,18 @@ static int intel_th_remove(struct device *dev) ...@@ -100,16 +100,18 @@ static int intel_th_remove(struct device *dev)
struct intel_th_driver *thdrv = to_intel_th_driver(dev->driver); struct intel_th_driver *thdrv = to_intel_th_driver(dev->driver);
struct intel_th_device *thdev = to_intel_th_device(dev); struct intel_th_device *thdev = to_intel_th_device(dev);
struct intel_th_device *hub = to_intel_th_hub(thdev); struct intel_th_device *hub = to_intel_th_hub(thdev);
int err;
if (thdev->type == INTEL_TH_SWITCH) { if (thdev->type == INTEL_TH_SWITCH) {
struct intel_th *th = to_intel_th(hub); struct intel_th *th = to_intel_th(hub);
int i, lowest; int i, lowest;
/* disconnect outputs */ /*
err = device_for_each_child(dev, thdev, intel_th_child_remove); * disconnect outputs
if (err) *
return err; * intel_th_child_remove returns 0 unconditionally, so there is
* no need to check the return value of device_for_each_child.
*/
device_for_each_child(dev, thdev, intel_th_child_remove);
/* /*
* Remove outputs, that is, hub's children: they are created * Remove outputs, that is, hub's children: they are created
......
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