bus: moxtet: remove set but not used variable 'dummy'
authorJason Yan <yanaijie@huawei.com>
Thu, 22 Aug 2019 01:03:51 +0000 (03:03 +0200)
committerArnd Bergmann <arnd@arndb.de>
Wed, 4 Sep 2019 15:30:10 +0000 (17:30 +0200)
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/bus/moxtet.c: In function moxtet_remove:
drivers/bus/moxtet.c:822:6: warning: variable dummy set but not used
[-Wunused-but-set-variable]

Link: https://lore.kernel.org/r/20190822010351.15660-3-marek.behun@nic.cz
Signed-off-by: Jason Yan <yanaijie@huawei.com>
Signed-off-by: Marek BehĂșn <marek.behun@nic.cz>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
drivers/bus/moxtet.c

index 1ee4570e7e17b0bbfbea8d59235b539ad21d946c..baccf76093572e6dcba8efc14576cd127f05ea85 100644 (file)
@@ -819,7 +819,6 @@ static int moxtet_probe(struct spi_device *spi)
 static int moxtet_remove(struct spi_device *spi)
 {
        struct moxtet *moxtet = spi_get_drvdata(spi);
-       int dummy;
 
        free_irq(moxtet->dev_irq, moxtet);
 
@@ -827,7 +826,7 @@ static int moxtet_remove(struct spi_device *spi)
 
        moxtet_unregister_debugfs(moxtet);
 
-       dummy = device_for_each_child(moxtet->dev, NULL, __unregister);
+       device_for_each_child(moxtet->dev, NULL, __unregister);
 
        mutex_destroy(&moxtet->lock);