diff options
author | Lee Jones <lee.jones@linaro.org> | 2020-11-04 22:35:14 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-11-06 12:49:26 +0300 |
commit | c0ed8ecb177de776fd02ad3e0b00787828de1fb2 (patch) | |
tree | 37f53db5173b64b988a20ab3d72c01d2108a0bcf /drivers/tty/serdev/core.c | |
parent | c35f638fc2adbb9c439ce68b559d406387cbdbe8 (diff) | |
download | linux-c0ed8ecb177de776fd02ad3e0b00787828de1fb2.tar.xz |
tty: serdev: core: Remove unused variable 'dummy'
No need to have a dummy variable here.
Fixes the following W=1 kernel build warning(s):
drivers/tty/serdev/core.c: In function ‘serdev_controller_remove’:
drivers/tty/serdev/core.c:791:6: warning: variable ‘dummy’ set but not used [-Wunused-but-set-variable]
Cc: Rob Herring <robh@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>
Cc: linux-serial@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20201104193549.4026187-2-lee.jones@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serdev/core.c')
-rw-r--r-- | drivers/tty/serdev/core.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/tty/serdev/core.c b/drivers/tty/serdev/core.c index c5f0d936b003..fecc28a73b3b 100644 --- a/drivers/tty/serdev/core.c +++ b/drivers/tty/serdev/core.c @@ -788,13 +788,10 @@ static int serdev_remove_device(struct device *dev, void *data) */ void serdev_controller_remove(struct serdev_controller *ctrl) { - int dummy; - if (!ctrl) return; - dummy = device_for_each_child(&ctrl->dev, NULL, - serdev_remove_device); + device_for_each_child(&ctrl->dev, NULL, serdev_remove_device); pm_runtime_disable(&ctrl->dev); device_del(&ctrl->dev); } |