mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-30 06:26:48 +07:00
staging: comedi: Fix reversed test in comedi_device_attach()
Commit 3902a37028
(staging: comedi:
refactor comedi_device_attach() a bit) by yours truly introduced an
inverted logic bug in comedi_device_attach() for the case where the
driver expects the device to be configured by driver name rather than
board name. The result of a strcmp() is being tested incorrectly. Fix
it.
Thanks to Stephen N Chivers for discovering the bug and suggesting the
fix.
Cc: <stable@vger.kernel.org> # 3.5.x
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
a26f4dd0eb
commit
80eb7a506f
@ -168,7 +168,7 @@ int comedi_device_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
dev->board_ptr = comedi_recognize(driv, it->board_name);
|
||||
if (dev->board_ptr)
|
||||
break;
|
||||
} else if (strcmp(driv->driver_name, it->board_name))
|
||||
} else if (strcmp(driv->driver_name, it->board_name) == 0)
|
||||
break;
|
||||
module_put(driv->module);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user