]> git.baikalelectronics.ru Git - kernel.git/commit
pccard_store_cis: fix wrong error handling
authorLinus Torvalds <torvalds@g5.osdl.org>
Sun, 1 Oct 2006 20:17:44 +0000 (13:17 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sun, 1 Oct 2006 20:17:44 +0000 (13:17 -0700)
commit3be6dd7e3cb4ad29c531f8e1c1990b3222b83fe5
tree8095561ebb7b01bd21e1f6ca548a3ea0b2bca675
parentd124faa08153526197be1b9fcdb071eebc590d41
pccard_store_cis: fix wrong error handling

The test for the error from pcmcia_replace_cis() was incorrect, and
would always trigger (because if an error didn't happen, the "ret" value
would not be zero, it would be the passed-in count).

Reported and debugged by Fabrice Bellet <fabrice@bellet.info>

Rather than just fix the single broken test, make the code in question
use an understandable code-sequence instead, fixing the whole function
to be more readable.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/pcmcia/socket_sysfs.c