public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] V4L/DVB: soc-camera: module_put() fix
@ 2010-07-05 10:12 Magnus Damm
  2010-07-05 19:58 ` Guennadi Liakhovetski
  0 siblings, 1 reply; 2+ messages in thread
From: Magnus Damm @ 2010-07-05 10:12 UTC (permalink / raw)
  To: g.liakhovetski; +Cc: Magnus Damm, linux-media

From: Magnus Damm <damm@opensource.se>

Avoid calling module_put() if try_module_get() has
been skipped.

Signed-off-by: Magnus Damm <damm@opensource.se>
---

 drivers/media/video/soc_camera.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- 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:

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-07-05 19:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-05 10:12 [PATCH] V4L/DVB: soc-camera: module_put() fix Magnus Damm
2010-07-05 19:58 ` Guennadi Liakhovetski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox