]> git.baikalelectronics.ru Git - kernel.git/commit
staging: comedi: Fix reversed test in comedi_device_attach()
authorIan Abbott <abbotti@mev.co.uk>
Tue, 14 Aug 2012 10:29:17 +0000 (11:29 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Aug 2012 23:52:17 +0000 (16:52 -0700)
commit4d8e6a6baf5fe9aaf5aae4ce2dc3bcba89dbd0ee
tree5554495632f96f05252bc9c3151b7cdb80c12f49
parent933e622366691067c9bf786039777ad54f421a83
staging: comedi: Fix reversed test in comedi_device_attach()

Commit fdfa58b46bfd074d6065c7892832450d26d59f93 (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>
drivers/staging/comedi/drivers.c