From patchwork Wed Oct 1 23:10:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Henriques X-Patchwork-Id: 26263 X-Patchwork-Delegate: hdegoede@redhat.com Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1XZT2C-0006tz-Is; Thu, 02 Oct 2014 01:10:12 +0200 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.72/mailfrontend-5) with esmtp id 1XZT29-0004OB-7A; Thu, 02 Oct 2014 01:10:11 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754173AbaJAXKH (ORCPT + 1 other); Wed, 1 Oct 2014 19:10:07 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:39958 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752419AbaJAXKG (ORCPT ); Wed, 1 Oct 2014 19:10:06 -0400 Received: from bl20-157-241.dsl.telepac.pt ([2.81.157.241] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1XZT21-0000hs-85; Wed, 01 Oct 2014 23:10:01 +0000 Date: Thu, 2 Oct 2014 00:10:00 +0100 From: Luis Henriques To: Hans de Goede , Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/5] [media] pwc-if: fix build warning when !CONFIG_USB_PWC_INPUT_EVDEV Message-ID: <20141001231000.GA25634@hercules> MIME-Version: 1.0 Content-Disposition: inline Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2014.10.1.225723 X-PMX-Spam: Gauge=IIIIIIIII, Probability=9%, Report=' MULTIPLE_RCPTS 0.1, HTML_00_01 0.05, HTML_00_10 0.05, MSGID_ADDED_BY_MTA 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1500_1599 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, INVALID_MSGID_NO_FQDN 0, URI_ENDS_IN_HTML 0, __ANY_URI 0, __CD 0, __CP_URI_IN_BODY 0, __CT 0, __CT_TEXT_PLAIN 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_X_MAILING_LIST 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __MULTIPLE_RCPTS_CC_X2 0, __PHISH_SPEAR_SUBJECT 0, __SANE_MSGID 0, __TO_MALFORMED_2 0, __URI_NO_WWW 0, __URI_NS ' Label err_video_unreg in function usb_pwc_probe() is only used when CONFIG_USB_PWC_INPUT_EVDEV is defined. drivers/media/usb/pwc/pwc-if.c:1104:1: warning: label 'err_video_unreg' defined but not used [-Wunused-label] Signed-off-by: Luis Henriques --- drivers/media/usb/pwc/pwc-if.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/media/usb/pwc/pwc-if.c b/drivers/media/usb/pwc/pwc-if.c index 15b754da4a2c..e6b7e63b0b8e 100644 --- a/drivers/media/usb/pwc/pwc-if.c +++ b/drivers/media/usb/pwc/pwc-if.c @@ -1078,7 +1078,8 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id pdev->button_dev = input_allocate_device(); if (!pdev->button_dev) { rc = -ENOMEM; - goto err_video_unreg; + video_unregister_device(&pdev->vdev); + goto err_unregister_v4l2_dev; } usb_make_path(udev, pdev->button_phys, sizeof(pdev->button_phys)); @@ -1095,14 +1096,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: