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-03 00:20:31 +02:00
2014-04-05 15:37:40 -07:00
2014-04-24 09:57:02 -07:00
2014-03-25 21:06:02 -04:00
2014-04-29 15:44:05 +01:00
2014-03-27 14:20:04 -04:00
2014-05-05 07:46:56 -07:00
2014-04-25 09:47:16 +03:00
2014-04-05 15:37:40 -07:00
2014-05-06 13:05:00 -07:00
2014-05-04 11:35:29 +01:00
2014-04-29 19:26:58 +02:00
2014-04-24 13:44:54 -04:00
2014-04-29 01:28:17 +02:00
2014-04-08 13:27:40 +02:00
2014-04-03 09:28:16 -07:00
2014-03-21 11:16:30 +09:00
2014-04-16 12:03:47 +05:30
2014-04-04 09:50:07 -07:00
2014-03-19 14:41:58 +09:00
2014-04-11 11:58:33 -07:00
2014-04-22 09:28:02 -07:00
2014-05-07 09:10:28 +10:00
2014-05-07 16:07:58 -07:00
2014-04-16 14:14:07 -07:00
2014-05-01 04:07:52 -07:00
2014-04-09 08:45:40 -07:00
2014-04-21 23:36:07 +02:00
2014-04-26 11:22:16 +01:00
2014-04-28 17:29:41 -07:00
2014-06-07 23:20:24 -07:00
2014-04-16 16:09:40 +02:00
2014-04-29 19:23:22 +02:00
2014-04-22 21:22:47 -04:00
2014-04-10 09:06:10 -07:00
2014-04-07 16:35:52 -07:00
2014-04-16 12:28:47 -07:00
2014-05-02 14:14:02 -07:00
2014-04-16 11:57:27 +05:30
2014-04-01 15:14:04 -07:00
2014-05-08 08:44:50 +01:00
2014-04-16 12:28:47 -07:00
2014-05-08 08:44:50 +01:00
2014-05-07 16:28:52 -07:00
2014-05-05 17:11:18 -04:00
2014-04-07 10:59:20 -07:00
2014-04-24 21:40:22 +01:00
2014-03-20 13:43:46 +01:00
2014-04-16 10:24:32 -06:00
2014-04-01 15:14:04 -07:00
2014-04-24 12:53:38 -07:00
2014-04-23 16:09:53 +02:00
2014-05-26 19:08:21 -07:00
2014-05-05 16:07:46 -07:00
2014-04-24 17:20:50 +01:00
2014-04-07 14:55:46 -07:00
2014-04-01 16:43:18 -04:00
2014-04-18 16:40:08 -07:00
2014-04-07 16:36:07 -07:00
2014-04-14 22:16:25 +01:00
2014-03-27 01:28:19 +01:00
2014-05-06 13:04:58 -07:00
2014-04-17 12:46:28 +02:00
2014-05-05 15:59:46 -07:00
2014-04-05 15:38:41 -07:00
2014-04-23 13:50:18 +01:00
2014-04-30 14:19:23 -07:00
2014-04-12 17:31:22 -07:00
2014-04-10 09:15:46 -07:00
2014-05-03 18:14:28 -04:00
2014-05-03 19:41:07 -04:00
2014-04-24 12:45:40 -07:00
2014-04-03 14:05:02 -07:00
2014-04-12 16:51:08 -07:00
2014-04-17 08:10:20 +03:00
2014-04-16 14:08:37 -07:00
2014-04-16 14:07:51 -07:00
2014-04-07 14:55:46 -07:00
2014-04-17 10:54:07 -07:00
2014-04-17 08:10:19 +03:00