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 <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Sudip Mukherjee 2015-10-28 14:41:40 +05:30 committed by Greg Kroah-Hartman
parent e732b93c32
commit e0a7f1f04c

View file

@ -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;