diff mbox

V4L/DVB: soc-camera: module_put() fix

Message ID 20100705101259.23155.79936.sendpatchset@t400s (mailing list archive)
State Rejected
Headers show

Commit Message

Magnus Damm July 5, 2010, 10:12 a.m. UTC
None
diff mbox

Patch

--- 0001/drivers/media/video/soc_camera.c
+++ work/drivers/media/video/soc_camera.c	2010-06-23 13:43:05.000000000 +0900
@@ -1034,7 +1034,8 @@  eiufmt:
 		soc_camera_free_i2c(icd);
 	} else {
 		icl->del_device(icl);
-		module_put(control->driver->owner);
+		if (control && control->driver && control->driver->owner)
+			module_put(control->driver->owner);
 	}
 enodrv:
 eadddev: