summaryrefslogtreecommitdiffstats
path: root/drivers/spi
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2019-06-15 20:41:35 +0300
committerMark Brown <broonie@kernel.org>2019-06-17 13:50:52 +0100
commitebc37af5e0a134355ea2b62ed4141458bdbd5389 (patch)
treec75018efc02c6dfced5f6a20f7d3bb97cc909746 /drivers/spi
parent36f34737ff48f66c8a19b8788311e4b40d4adf80 (diff)
downloadlinux-ebc37af5e0a134355ea2b62ed4141458bdbd5389.tar.bz2
spi: No need to assign dummy value in spi_unregister_controller()
The device_for_each_child() doesn't require the returned value to be checked. Thus, drop the dummy variable completely and have no warning anymore: drivers/spi/spi.c: In function ‘spi_unregister_controller’: drivers/spi/spi.c:2480:6: warning: variable ‘dummy’ set but not used [-Wunused-but-set-variable] int dummy; ^~~~~ Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 498f9b7419a4..e71881afe475 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -2559,7 +2559,6 @@ void spi_unregister_controller(struct spi_controller *ctlr)
{
struct spi_controller *found;
int id = ctlr->bus_num;
- int dummy;
/* First make sure that this controller was ever added */
mutex_lock(&board_lock);
@@ -2573,7 +2572,7 @@ void spi_unregister_controller(struct spi_controller *ctlr)
list_del(&ctlr->list);
mutex_unlock(&board_lock);
- dummy = device_for_each_child(&ctlr->dev, NULL, __unregister);
+ device_for_each_child(&ctlr->dev, NULL, __unregister);
device_unregister(&ctlr->dev);
/* free bus id */
mutex_lock(&board_lock);