From patchwork Tue Jan 26 14:09:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 8123201 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A91B5BEEE5 for ; Tue, 26 Jan 2016 14:13:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B4CAF2026C for ; Tue, 26 Jan 2016 14:13:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8CAE920259 for ; Tue, 26 Jan 2016 14:13:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757028AbcAZOLO (ORCPT ); Tue, 26 Jan 2016 09:11:14 -0500 Received: from mout.kundenserver.de ([217.72.192.75]:54715 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756956AbcAZOLN (ORCPT ); Tue, 26 Jan 2016 09:11:13 -0500 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue101) with ESMTPA (Nemesis) id 0MGAYZ-1aHgfq2d2l-00FC0a; Tue, 26 Jan 2016 15:10:29 +0100 From: Arnd Bergmann To: Hans de Goede , Mauro Carvalho Chehab Cc: linux-arm-kernel@lists.infradead.org, Arnd Bergmann , Hans Verkuil , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/7] [media] pwc: hide unused label Date: Tue, 26 Jan 2016 15:09:55 +0100 Message-Id: <1453817424-3080054-1-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 X-Provags-ID: V03:K0:N/LXzWLU7AzQzMoVs9zdG0Kdu9hALU3r3D3ylp60wdyw6HXhTL8 KkN+lGwDNhPahiNadqxqvoX19geGmMDqOW7GUkbkoK6lbLden3J6Q7Mia5WevLtYrNi510w 0H3WvL5m5TaNsdoMQRJzoEz8H+TMvnq6vZXHGCPBH/4lxFX2rYvRU8gWO43GSY8PG9ZEuzU Ei4wPtODflTYJFlVP7Aew== X-UI-Out-Filterresults: notjunk:1; V01:K0:dlmY3o4VsCk=:BnpMBWho8E3hyc+BSj9Qgv 5uaD4naqRO8ZD/lkOg6aeXmk3CoemDhoRgeMvgieGb3SWfQZv6PfJlMoNomOBuLHz+y889sVH AjTgtZqN1ADNDidyjRfvUCe+n/+pa7VvlXgW6ONxeM6mHbmm+Vas2wVnhHAo9rms42vMnR4+X 47AXTwxCECOXvTLbtvK1TCAUmHWs3T+nCvxx96/bDHdZcaI7XO/QCH3KOVaebOfF0N9+0gEOS 7Du0ZcTXDc6buSrSvXqIVC2MT6MzKmpGR4m8Jxd3CX0IFahqJjXuG07AnxOUHIXMQzoweFDyf jv9oY+RoijcnSOGep/Vvw1QczQG2cRXfk+8MhmnT9dXGqjyUBpFn62wX7wguE3vIFfqaKhAXR 5GzSWrdfDBJzpUp/llW9nmUDxdHaTm1qO/F/RoXQLOogR6jMRuxexZkVj8T3tNGGHCxJ+ZG7t 6cYpmw+KIPaw6iAEPPec3LURE3w93CoiFxf3PGmqLh0GmetSXXR+u6CXYIr4aXtGtv4sIwOGr vsoSvmV2JgeNJG6NUT0V4YJDz6yE0lWsA0nQyvBMe6NnSsy2wNSz6NVcpyz7EJWXlceqWf6D3 AVFKw6MYgXsYQXNnWm1/FKRCJr39c09HQlddQ4KaasvKDnkLJFKBmFw6Xrby4lvUsJcEiWpQb 6xr1Y6mVsrkBG3Rp5yNQPRLs3U4b5jCn3/Wt2UjPqLoyGI1Ac2Ya1VJi5YfxzHVoBxF0= Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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: