Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1256807 > unrolled thread
| Started by | Sudip Mukherjee <sudipm.mukherjee@gmail.com> |
|---|---|
| First post | 2015-10-27 15:50 +0100 |
| Last post | 2015-10-27 15:50 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 11/11] parport: avoid assignment in if Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-10-27 15:50 +0100
| From | Sudip Mukherjee <sudipm.mukherjee@gmail.com> |
|---|---|
| Date | 2015-10-27 15:50 +0100 |
| Subject | [PATCH 11/11] parport: avoid assignment in if |
| Message-ID | <qodJx-6ns-53@gated-at.bofh.it> |
From: Sudip Mukherjee <sudip@vectorindia.org>
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>
---
drivers/parport/share.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/parport/share.c b/drivers/parport/share.c
index b68f194..3308427 100644
--- 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;
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top | Article view | linux.kernel
csiph-web