diff mbox series

[added,to,the,4.1,stable,tree,media] pwc: hide unused label

Message ID 20180301152116.1486-457-alexander.levin@microsoft.com
State New
Headers show
Series [added,to,the,4.1,stable,tree,media] pwc: hide unused label | expand

Commit Message

Sasha Levin March 1, 2018, 3:27 p.m. UTC
From: Arnd Bergmann <arnd@arndb.de>


This patch has been added to the 4.1 stable tree. If you have any
objections, please let us know.

-- 
2.14.1
diff mbox series

Patch

===============

[ Upstream commit 1f6bcd011464cb36059e2562f72baf75f98b732d ]

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]

This moves the unused label and code inside another #ifdef to
get rid of the warning.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
---
 drivers/media/usb/pwc/pwc-if.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/media/usb/pwc/pwc-if.c b/drivers/media/usb/pwc/pwc-if.c
index a7e1f6f37790..a8f265cee365 100644
--- a/drivers/media/usb/pwc/pwc-if.c
+++ b/drivers/media/usb/pwc/pwc-if.c
@@ -1110,8 +1110,10 @@  static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id
 
 	return 0;
 
+#ifdef CONFIG_USB_PWC_INPUT_EVDEV
 err_video_unreg:
 	video_unregister_device(&pdev->vdev);
+#endif
 err_unregister_v4l2_dev:
 	v4l2_device_unregister(&pdev->v4l2_dev);
 err_free_controls: