Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Lee Jones and committed by
Greg Kroah-Hartman
c0ed8ecb c35f638f

+1 -4
+1 -4
drivers/tty/serdev/core.c
··· 788 788 */ 789 789 void serdev_controller_remove(struct serdev_controller *ctrl) 790 790 { 791 - int dummy; 792 - 793 791 if (!ctrl) 794 792 return; 795 793 796 - dummy = device_for_each_child(&ctrl->dev, NULL, 797 - serdev_remove_device); 794 + device_for_each_child(&ctrl->dev, NULL, serdev_remove_device); 798 795 pm_runtime_disable(&ctrl->dev); 799 796 device_del(&ctrl->dev); 800 797 }