diff options
author | 2013-12-10 16:31:25 -0700 | |
---|---|---|
committer | 2013-12-17 13:05:53 -0800 | |
commit | c6236c0ce39c809c336ca929f68cf8ad02cf94e0 (patch) | |
tree | 40af5aa6b9f1f2266de5d9eed11f09b11a5f7e6c | |
parent | staging: comedi: 8255_pci: fix for newer PCI-DIO48H (diff) | |
download | linux-dev-c6236c0ce39c809c336ca929f68cf8ad02cf94e0.tar.xz linux-dev-c6236c0ce39c809c336ca929f68cf8ad02cf94e0.zip |
staging: comedi: drivers: fix return value of comedi_load_firmware()
Some of the callback functions that upload the firmware in the comedi
drivers return a positive value indicating the number of bytes sent
to the device. Detect this condition and just return '0' to indicate
a successful upload.
Reported-by: Bernd Porr <mail@berndporr.me.uk>
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Ian Abbott <abbotti@mev.co.uk>
Acked-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/comedi/drivers.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/comedi/drivers.c b/drivers/staging/comedi/drivers.c index 8f02bf66e20b..4964d2a2fc7d 100644 --- a/drivers/staging/comedi/drivers.c +++ b/drivers/staging/comedi/drivers.c @@ -446,7 +446,7 @@ int comedi_load_firmware(struct comedi_device *dev, release_firmware(fw); } - return ret; + return ret < 0 ? ret : 0; } EXPORT_SYMBOL_GPL(comedi_load_firmware); |