projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5be789f
)
[media] media: rc: rdev->open or rdev->close can be NULL
author
Juergen Lock
<nox@jelal.kn-bremen.de>
Fri, 16 Aug 2013 18:00:24 +0000
(15:00 -0300)
committer
Mauro Carvalho Chehab
<m.chehab@samsung.com>
Fri, 23 Aug 2013 08:41:23 +0000
(
05:41
-0300)
At least technisat-usb2.c doesn't set these...
Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/rc/rc-main.c
patch
|
blob
|
history
diff --git
a/drivers/media/rc/rc-main.c
b/drivers/media/rc/rc-main.c
index aa5d8e72462211d7b50b67b19b1ed033d288bd66..46da365c9c845bd8f980dd0df81f60fbfe3be338 100644
(file)
--- a/
drivers/media/rc/rc-main.c
+++ b/
drivers/media/rc/rc-main.c
@@
-711,7
+711,7
@@
int rc_open(struct rc_dev *rdev)
return -EINVAL;
mutex_lock(&rdev->lock);
- if (!rdev->users++)
+ if (!rdev->users++
&& rdev->open != NULL
)
rval = rdev->open(rdev);
if (rval)
@@
-735,7
+735,7
@@
void rc_close(struct rc_dev *rdev)
if (rdev) {
mutex_lock(&rdev->lock);
- if (!--rdev->users)
+ if (!--rdev->users
&& rdev->close != NULL
)
rdev->close(rdev);
mutex_unlock(&rdev->lock);