]> git.karo-electronics.de Git - karo-tx-linux.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>
Sun, 26 Aug 2012 02:31:43 +0000 (19:31 -0700)
commitc8d54c4c73b719db5cb977b61d14bc0c184050f3
treee47f715190ee0266cc6e0e5af13bfa9a30327ca7
parent10eac236981c501f74682f122037021acd6a452b
staging: comedi: Fix reversed test in comedi_device_attach()

commit 80eb7a506fdcea08f86c9dfc7c638303bf02a3c8 upstream.

Commit 3902a370281d2f2b130f141e8cf94eab40125769 (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.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers.c