From: Magnus Damm <magnus.damm@gmail.com>
To: g.liakhovetski@gmx.de
Cc: Magnus Damm <magnus.damm@gmail.com>, linux-media@vger.kernel.org
Subject: [PATCH] V4L/DVB: soc-camera: module_put() fix
Date: Mon, 05 Jul 2010 19:12:59 +0900 [thread overview]
Message-ID: <20100705101259.23155.79936.sendpatchset@t400s> (raw)
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:
next reply other threads:[~2010-07-05 10:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-05 10:12 Magnus Damm [this message]
2010-07-05 19:58 ` [PATCH] V4L/DVB: soc-camera: module_put() fix Guennadi Liakhovetski
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=20100705101259.23155.79936.sendpatchset@t400s \
--to=magnus.damm@gmail.com \
--cc=g.liakhovetski@gmx.de \
--cc=linux-media@vger.kernel.org \
/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