]> git.karo-electronics.de Git - karo-tx-linux.git/commit
staging: ks7010: fix memcmp() bug
authorTobin C. Harding <me@tobin.cc>
Wed, 22 Mar 2017 00:59:52 +0000 (11:59 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Mar 2017 13:27:23 +0000 (14:27 +0100)
commit58af272b333eeba428ca53b5b80dbbcf120fe57a
tree0c8c3ec2b2faf1bdf4eafb75ea31fbdf26873824
parent12eed2f2fb8ff7623295a5f69e22ef247273cd8f
staging: ks7010: fix memcmp() bug

Call site to memcmp() treats return value as if it were an error code,
it is not. If memcmp() finds inputs to be not the same, an error
return code should be set explicitly.

Correctly handle return value from call to memcmp(), set error code
explicitly.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ks7010/ks7010_sdio.c