From: Luis Henriques <luis.henriques@canonical.com>
To: Hans de Goede <hdegoede@redhat.com>,
Mauro Carvalho Chehab <m.chehab@samsung.com>
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
Date: Thu, 2 Oct 2014 00:10:00 +0100 [thread overview]
Message-ID: <20141001231000.GA25634@hercules> (raw)
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 <luis.henriques@canonical.com>
---
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:
--
2.1.0
next reply other threads:[~2014-10-01 23:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-01 23:10 Luis Henriques [this message]
2015-01-15 10:40 ` [3/5, media] pwc-if: fix build warning when !CONFIG_USB_PWC_INPUT_EVDEV Hans de Goede
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141001231000.GA25634@hercules \
--to=luis.henriques@canonical.com \
--cc=hdegoede@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=m.chehab@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).