Nick Dyer
68807a0c20
Input: atmel_mxt_ts - fix invalid return from mxt_get_bootloader_version
The patch e57a66aa85: "Input: atmel_mxt_ts - read and report
bootloader version" from May 18, 2014, leads to the following static
checker warning:
drivers/input/touchscreen/atmel_mxt_ts.c:437 mxt_get_bootloader_version()
warn: signedness bug returning '(-5)'
drivers/input/touchscreen/atmel_mxt_ts.c
429 static u8 mxt_get_bootloader_version(struct mxt_data *data, u8 val)
430 {
431 struct device *dev = &data->client->dev;
432 u8 buf[3];
433
434 if (val & MXT_BOOT_EXTENDED_ID) {
435 if (mxt_bootloader_read(data, &buf[0], 3) != 0) {
436 dev_err(dev, "%s: i2c failure\n", __func__);
437 return -EIO;
^^^^
This gets truncated into a number from 0-255 and anyway the caller
doesn't check for errors.
(reported by Dan Carpenter)
Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-06-07 23:20:24 -07:00
..
2014-05-29 00:26:35 -07:00
2014-05-14 16:39:47 -07:00
2012-11-24 00:05:38 -08:00
2013-09-20 09:58:29 -07:00
2014-01-06 23:23:57 -08:00
2014-05-14 16:49:19 -07:00
2014-06-07 23:20:24 -07:00
2014-01-06 23:23:57 -08:00
2013-11-20 21:15:52 -08:00
2014-05-14 16:39:58 -07:00
2012-11-27 23:05:19 -08:00
2013-12-06 02:06:29 -08:00
2013-11-20 21:15:26 -08:00
2013-07-06 21:57:06 -07:00
2013-06-30 21:24:24 -07:00
2013-11-11 00:01:45 -08:00
2013-12-16 02:04:49 -08:00
2013-07-06 21:57:06 -07:00
2013-12-15 02:54:04 -08:00
2013-06-30 21:24:16 -07:00
2013-07-06 21:57:06 -07:00
2014-05-28 23:48:36 -07:00
2013-05-05 20:14:41 -07:00
2014-01-06 23:23:57 -08:00
2014-06-07 23:20:22 -07:00
2013-12-06 02:06:29 -08:00
2014-05-14 16:39:59 -07:00
2014-01-06 23:23:57 -08:00
2014-01-06 23:23:57 -08:00
2014-01-06 23:23:57 -08:00
2014-01-06 23:23:57 -08:00
2013-09-18 07:53:30 -07:00
2013-12-06 02:06:29 -08:00
2014-01-06 23:23:57 -08:00
2014-05-29 00:26:33 -07:00
2014-01-06 23:23:57 -08:00
2014-05-29 00:05:59 -07:00
2014-05-14 16:40:00 -07:00
2014-01-06 23:23:57 -08:00
2014-05-29 00:05:59 -07:00
2014-01-06 23:23:57 -08:00
2013-05-05 20:14:52 -07:00
2014-05-28 23:48:17 -07:00
2014-05-28 23:48:03 -07:00
2014-01-06 23:23:57 -08:00
2014-05-29 00:05:59 -07:00
2014-01-06 23:23:57 -08:00
2014-01-06 23:23:57 -08:00
2014-05-18 23:25:57 -07:00
2014-01-06 23:23:57 -08:00
2014-02-11 00:36:00 +01:00
2014-01-06 23:23:57 -08:00
2014-05-14 16:40:06 -07:00
2013-12-01 22:17:35 -08:00
2014-01-24 17:17:30 -08:00
2014-01-06 23:23:57 -08:00
2014-01-06 23:23:57 -08:00
2014-01-06 23:23:57 -08:00
2013-07-01 11:38:41 -07:00
2014-01-06 23:23:57 -08:00
2014-05-29 00:06:00 -07:00
2013-11-25 18:27:56 -08:00
2014-01-06 23:23:57 -08:00
2014-01-06 23:23:57 -08:00
2013-05-08 09:04:16 -07:00
2013-06-18 23:19:00 -07:00
2014-01-06 23:23:57 -08:00
2013-12-06 02:06:29 -08:00
2014-01-06 23:23:57 -08:00
2013-03-12 08:50:20 -07:00
2014-05-14 16:40:01 -07:00
2014-01-06 23:23:57 -08:00