Skip to contentSkip to conversation

cx231xx: stray unlock on error path

PATCH New Dan Carpenter 1 participant 1 message Nov 18, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

drivers/media/video/cx231xx/cx231xx-cards.c +1 -5
index 56c2d81..b7b905f 100644
@@ -731,16 +731,12 @@ 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_init_extension(dev);
 
 	return 0;
-
-fail_reg_devices:
-	mutex_unlock(&dev->lock);
-	return retval;
 }
 
 #if defined(CONFIG_MODULES) && defined(MODULE)