From 5ae094cea1b4f3715ee6ea4f49d0b36d564f90e7 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Thu, 18 Nov 2010 00:56:37 -0300 Subject: [PATCH] [media] cx231xx: stray unlock on error path The lock isn't held here and doesn't need to be unlocked. The code has been like this since the driver was merged. Signed-off-by: Dan Carpenter Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/cx231xx/cx231xx-cards.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/media/video/cx231xx/cx231xx-cards.c b/drivers/media/video/cx231xx/cx231xx-cards.c index 2b6101763355..61756502c085 100644 --- a/drivers/media/video/cx231xx/cx231xx-cards.c +++ b/drivers/media/video/cx231xx/cx231xx-cards.c @@ -784,7 +784,7 @@ static int cx231xx_init_dev(struct cx231xx **devhandle, struct usb_device *udev, retval = cx231xx_register_analog_devices(dev); if (retval < 0) { cx231xx_release_resources(dev); - goto fail_reg_devices; + return retval; } cx231xx_ir_init(dev); @@ -792,10 +792,6 @@ static int cx231xx_init_dev(struct cx231xx **devhandle, struct usb_device *udev, cx231xx_init_extension(dev); return 0; - -fail_reg_devices: - mutex_unlock(&dev->lock); - return retval; } #if defined(CONFIG_MODULES) && defined(MODULE) -- 2.30.2