linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/7] [media] pwc: hide unused label
@ 2016-01-26 14:09 Arnd Bergmann
  2016-01-26 14:09 ` [PATCH 2/7] [media] hdpvr: hide unused variable Arnd Bergmann
                   ` (7 more replies)
  0 siblings, 8 replies; 18+ messages in thread
From: Arnd Bergmann @ 2016-01-26 14:09 UTC (permalink / raw)
  To: linux-arm-kernel

The pwc driver causes a warning when CONFIG_USB_PWC_INPUT_EVDEV is unset:

drivers/media/usb/pwc/pwc-if.c: In function 'usb_pwc_probe':
drivers/media/usb/pwc/pwc-if.c:1115:1: warning: label 'err_video_unreg' defined but not used [-Wunused-label]

Obviously, the cleanup of &pdev->vdev is not needed without the input device,
so we can just move it inside of the existing #ifdef and remove the
extra label.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/media/usb/pwc/pwc-if.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/usb/pwc/pwc-if.c b/drivers/media/usb/pwc/pwc-if.c
index 086cf1c7bd7d..bdd416af84c7 100644
--- a/drivers/media/usb/pwc/pwc-if.c
+++ b/drivers/media/usb/pwc/pwc-if.c
@@ -1106,14 +1106,13 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id
 	if (rc) {
 		input_free_device(pdev->button_dev);
 		pdev->button_dev = NULL;
-		goto err_video_unreg;
+		video_unregister_device(&pdev->vdev);
+		goto err_unregister_v4l2_dev;
 	}
 #endif
 
 	return 0;
 
-err_video_unreg:
-	video_unregister_device(&pdev->vdev);
 err_unregister_v4l2_dev:
 	v4l2_device_unregister(&pdev->v4l2_dev);
 err_free_controls:
-- 
2.7.0

^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2016-07-03 21:22 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-26 14:09 [PATCH 1/7] [media] pwc: hide unused label Arnd Bergmann
2016-01-26 14:09 ` [PATCH 2/7] [media] hdpvr: hide unused variable Arnd Bergmann
2016-01-26 14:09 ` [PATCH 3/7] [media] gspca: avoid unused variable warnings Arnd Bergmann
2016-07-03 21:22   ` [3/7,media] " Hans de Goede
2016-01-26 14:09 ` [PATCH 4/7] [media] b2c2: flexcop: avoid unused function warnings Arnd Bergmann
2016-01-26 14:09 ` [PATCH 5/7] [media] em28xx: only use mt9v011 if camera support is enabled Arnd Bergmann
2016-01-26 14:10 ` [PATCH 6/7] [media] em28xx: add MEDIA_TUNER dependency Arnd Bergmann
2016-01-26 14:33   ` Mauro Carvalho Chehab
2016-01-26 15:53     ` Arnd Bergmann
2016-01-26 16:36       ` Mauro Carvalho Chehab
2016-01-26 16:51         ` Arnd Bergmann
2016-01-26 17:08           ` Mauro Carvalho Chehab
2016-01-26 22:01             ` Arnd Bergmann
2016-01-26 14:10 ` [PATCH 7/7] [media] go7007: add MEDIA_CAMERA_SUPPORT dependency Arnd Bergmann
2016-01-26 15:04   ` Mauro Carvalho Chehab
2016-01-26 15:41     ` Mauro Carvalho Chehab
2016-01-26 14:40 ` [PATCH 1/7] [media] pwc: hide unused label kbuild test robot
2016-01-26 15:29 ` Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).