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:
e732b93
)
parport: avoid assignment in if
author
Sudip Mukherjee
<sudipm.mukherjee@gmail.com>
Wed, 28 Oct 2015 09:11:40 +0000
(14:41 +0530)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Mon, 4 Jan 2016 00:32:59 +0000
(16:32 -0800)
It is not an usual practise to assign some value to a variable in the if
test condition.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/parport/share.c
patch
|
blob
|
history
diff --git
a/drivers/parport/share.c
b/drivers/parport/share.c
index b68f19480dcfdaf54c74e644004c0e0ce7c769c7..3308427ed9f7a04bb50119882a2130f6e7ee13ed 100644
(file)
--- a/
drivers/parport/share.c
+++ b/
drivers/parport/share.c
@@
-1120,7
+1120,8
@@
int parport_claim(struct pardevice *dev)
/* Preempt any current device */
write_lock_irqsave(&port->cad_lock, flags);
- if ((oldcad = port->cad) != NULL) {
+ oldcad = port->cad;
+ if (oldcad) {
if (oldcad->preempt) {
if (oldcad->preempt(oldcad->private))
goto blocked;