From: Sudip Mukherjee Date: Wed, 28 Oct 2015 09:11:40 +0000 (+0530) Subject: parport: avoid assignment in if X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=e0a7f1f04cd9bb13df7503ba7156ff0a37c9f460;p=openwrt%2Fstaging%2Fblogic.git parport: avoid assignment in if It is not an usual practise to assign some value to a variable in the if test condition. Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/parport/share.c b/drivers/parport/share.c index b68f19480dcf..3308427ed9f7 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;