[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20140106223745.652140120@linuxfoundation.org>
Date: Mon, 6 Jan 2014 14:36:12 -0800
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Bernd Porr <mail@...ndporr.me.uk>,
H Hartley Sweeten <hsweeten@...ionengravers.com>,
Ian Abbott <abbotti@....co.uk>,
Dan Carpenter <dan.carpenter@...cle.com>
Subject: [PATCH 3.12 011/144] staging: comedi: drivers: fix return value of comedi_load_firmware()
3.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: H Hartley Sweeten <hsweeten@...ionengravers.com>
commit c6236c0ce39c809c336ca929f68cf8ad02cf94e0 upstream.
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@...ndporr.me.uk>
Signed-off-by: H Hartley Sweeten <hsweeten@...ionengravers.com>
Acked-by: Ian Abbott <abbotti@....co.uk>
Acked-by: Dan Carpenter <dan.carpenter@...cle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/staging/comedi/drivers.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/staging/comedi/drivers.c
+++ b/drivers/staging/comedi/drivers.c
@@ -417,7 +417,7 @@ int comedi_load_firmware(struct comedi_d
release_firmware(fw);
}
- return ret;
+ return ret < 0 ? ret : 0;
}
EXPORT_SYMBOL_GPL(comedi_load_firmware);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists