提交 e0a7f1f0 编写于 作者: S Sudip Mukherjee 提交者: Greg Kroah-Hartman

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: NSudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 e732b93c
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册