staging: ks7010: fix error handling in ks7010_upload_firmware
authorSergio Paracuellos <sergio.paracuellos@gmail.com>
Tue, 3 Apr 2018 15:13:00 +0000 (17:13 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 23 Apr 2018 12:22:07 +0000 (14:22 +0200)
commit6e043704fb99e3e1d7a1bb02030e49c093cdd943
treecb233215cee82bca3de80957bb1544a2b29c7827
parent6e6156f614da0df8078a8f453c8a2e23cbb9338f
staging: ks7010: fix error handling in ks7010_upload_firmware

This commit checks missing error code check when checking
if the firmware is running reading General Communication
Register A (GCR_A).

It also set ret to EBUSY if firmware is running before
copying it.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ks7010/ks7010_sdio.c