re: Input: add driver for Elan I2C/SMbus touchpad

2014-10-23 Thread Dan Carpenter
return -EIO; 383 } regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[patch] HID: logitech-hidpp: leaks and NULL dereferences

2014-10-31 Thread Dan Carpenter
Shift the allocation down a few lines to avoid a memory leak and also add a check for allocation failure. Fixes: 2f31c5252910 ('HID: Introduce hidpp, a module to handle Logitech hid++ devices') Signed-off-by: Dan Carpenter diff --git a/drivers/hid/hid-logitech-hidpp.c b/drive

re: HID: Introduce hidpp, a module to handle Logitech hid++ devices

2014-10-31 Thread Dan Carpenter
drivers/hid/hid-logitech-hidpp.c:524 hidpp_touchpad_get_raw_info() warn: should this return really be negated? regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 1/2] HID: logitech-hidpp: fix negated returns

2014-11-03 Thread Dan Carpenter
handle -ENOMEM and -EINVAL here as well. Something like: if (ret > 0) { hid_err(hidpp->hid_dev, "%s: received protocol error 0x%02x\n", __func__, ret); ret = -EPROTO; } if (ret) return ret;

Re: [PATCH v2 1/2] HID: logitech-hidpp: fix negated returns

2014-11-03 Thread Dan Carpenter
Looks good. Thanks! regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[patch] Input: lm8323 - missing error check in lm8323_set_disable()

2014-12-02 Thread Dan Carpenter
The missing error handling here is not especially harmful but static checkers complain that "i" can be used uninitialized. Signed-off-by: Dan Carpenter diff --git a/drivers/input/keyboard/lm8323.c b/drivers/input/keyboard/lm8323.c index cb32e2b..21bea52 100644 --- a/drivers/inpu

[patch] HID: roccat: potential out of bounds in pyra_sysfs_write_settings()

2015-01-09 Thread Dan Carpenter
_sysfs_write_settings() in both places because I wasn't positive that the other callers were correct. Signed-off-by: Dan Carpenter diff --git a/drivers/hid/hid-roccat-pyra.c b/drivers/hid/hid-roccat-pyra.c index 1a07e07..47d7e74 100644 --- a/drivers/hid/hid-roccat-pyra.c +++ b/drivers/hid/

re: Input: cyapa - add gen5 trackpad device basic functions support

2015-01-21 Thread Dan Carpenter
gen5_pip->resp_sort_func); 2564 if (gen5_pip->resp_len && length != 0) { ^^ Patch introduces a check. 2565 *gen5_pip->resp_len = length; 2566

[patch] Input: cyapa - off by on in cyapa_update_fw_store()

2015-01-21 Thread Dan Carpenter
If "(count == NAME_MAX)" then we could end up putting the NUL terminator one space beyond the end of the fw_name[] array. Signed-off-by: Dan Carpenter diff --git a/drivers/input/mouse/cyapa.c b/drivers/input/mouse/cyapa.c index 64c6128..58f4f6f 100644 --- a/drivers/input/mouse/cya

Re: Input: cyapa - add gen5 trackpad device basic functions support

2015-01-22 Thread Dan Carpenter
;t. $ smdb call_tree cyapa_i2c_pip_cmd_irq_sync | grep cyapa_empty_pip_output_data But, uh.. it's been years since I tried looking at the call_tree code so I have no idea if it works... regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 1/2] input: cyapa: fix sparse warning issue of incorrect type in assiggment

2015-01-22 Thread Dan Carpenter
n these on. make C=2 CF=-D__CHECK_ENDIAN__ http://lwn.net/Articles/205624/ regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[patch] Input: remove a duplicative NULL test

2014-02-21 Thread Dan Carpenter
"pdata" is non-NULL here. We verified that at the start of the function. Signed-off-by: Dan Carpenter diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c index a70400754e92..40abe90cc924 100644 --- a/drivers/input/touchscreen/atmel_mxt_

Re: [PATCHv6] staging/iio/adc: change the MXS touchscreen driver implementation

2014-02-24 Thread Dan Carpenter
adc, LRADC_CTRL1_TOUCH_DETECT_IRQ, LRADC_CTRL1); > mxs_lradc_reg_set(lradc, LRADC_CTRL1_TOUCH_DETECT_IRQ_EN, > LRADC_CTRL1); > } I am confused. Why don't you send this like a normal patch? regards, dan carpenter -- To unsubscribe from this list: send the line "unsubs

Re: [PATCHv6] staging/iio/adc: change the MXS touchscreen driver implementation

2014-02-24 Thread Dan Carpenter
On Mon, Feb 24, 2014 at 03:38:26PM +0100, Juergen Beisert wrote: > Hi Dan, > > On Monday 24 February 2014 14:33:16 Dan Carpenter wrote: > > On Mon, Feb 24, 2014 at 02:16:24PM +0100, Juergen Beisert wrote: > > > > While I don't have much experience with the TS pa

[patch] Input: edt-ft5x06 - add a missing condition

2014-04-02 Thread Dan Carpenter
The if condition was accidentally deleted here so we return every time instead of returning on error. Fixes: fd335ab04b3f ('Input: edt-ft5x06 - add support for M09 firmware version') Signed-off-by: Dan Carpenter diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/t

[patch v2] Input: edt-ft5x06 - add a missing condition

2014-04-02 Thread Dan Carpenter
The if condition was accidentally deleted here so we return every time instead of returning on error. Fixes: fd335ab04b3f ('Input: edt-ft5x06 - add support for M09 firmware version') Signed-off-by: Dan Carpenter --- v2: removed a stray tab character diff --git a/drivers/input/touch

re: Input: atmel_mxt_ts - read and report bootloader version

2014-05-21 Thread Dan Carpenter
"Bootloader ID:%d\n", val & MXT_BOOT_ID_MASK); 445 446 return val; 447 } 448 } regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

re: Input: psmouse - switch to using dev_*() for messages

2014-06-12 Thread Dan Carpenter
^^^ New dereference. 1513 "reconnect request, but serio is disconnected, ignoring...\n"); 1514 return -1; regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body o

Re: [PATCH] drivers: Let several drivers depends on HAS_IOMEM for 'devm_ioremap_resource'

2014-07-17 Thread Dan Carpenter
t in "./include". > But may we move it from "lib/devres.c" to "./include/linux/err.h"? > > For me, I am not quite sure, it may need additional discussion, but at > least, that will be another patch. Yes. Move it there. That is the right place. regards, dan c

Re: [PATCH] drivers: Let several drivers depends on HAS_IOMEM for 'devm_ioremap_resource'

2014-07-23 Thread Dan Carpenter
On Wed, Jul 23, 2014 at 07:09:22PM +0800, Chen Gang wrote: > > > On 07/17/2014 05:19 PM, Chen Gang wrote: > > > > > > On 07/17/2014 05:16 PM, Dan Carpenter wrote: > >> On Thu, Jul 17, 2014 at 04:59:09PM +0800, Chen Gang wrote: > >>>>>

re: Input: atmel_mxt_ts - initialise IRQ before probing

2014-07-25 Thread Dan Carpenter
_nowait(THIS_MODULE, true, MXT_CFG_NAME, 1705 &data->client->dev, GFP_KERNEL, data, 1706 mxt_config_cb); 1707 1708 return 0; 1709 1710 err_free_object_table: 1711 mxt_free_object_table(data); 1712

re: HID: huion: Switch to generating report descriptor

2014-07-31 Thread Dan Carpenter
buf, sizeof(buf), ^^^ 130 USB_CTRL_GET_TIMEOUT); regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majord...@vger.kernel.org More majordomo info at http:/

[patch] HID: hid-logitech-dj: add some range checks

2013-03-05 Thread Dan Carpenter
pasted that here. DJ_DEVICE_INDEX_MIN is 1. DJ_DEVICE_INDEX_MAX is 6. Signed-off-by: Dan Carpenter --- This is a static checker fix and I'm not certain it's correct, please look it over carefully. I do not know this code well, so I don't know why a zero index is invalid. diff -

Re: [patch] HID: hid-logitech-dj: add some range checks

2013-03-05 Thread Dan Carpenter
ks. I thought it could be called with user supplied parameters. Never mind. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[patch 1/3] Input: cyttsp4 - silence shift wrap warning

2013-07-02 Thread Dan Carpenter
"*max" is a size_t (long) type but "1" is an int so static checkers complain that the shift could wrap. Signed-off-by: Dan Carpenter diff --git a/drivers/input/touchscreen/cyttsp4_core.c b/drivers/input/touchscreen/cyttsp4_core.c index 963da05..7aa4a34 100644 --- a/drive

[patch 2/3] Input: cyttsp4 - silence NULL dereference warning

2013-07-02 Thread Dan Carpenter
If "cd" were NULL then we would dereference it when we print the error message. Fortunately enough, it can't ever be NULL so we can remove those lines. Signed-off-by: Dan Carpenter diff --git a/drivers/input/touchscreen/cyttsp4_core.c b/drivers/input/touchscreen/cyttsp4_core.

[patch 3/3] Input: cyttsp4 - leak on error path in probe()

2013-07-02 Thread Dan Carpenter
We leak "cd" if the cd->xfer_buf allocation fails. It was weird to "goto error_gpio_irq" so I changed the label name. (Label names should reflect the label location not the goto location otherwise you get an "all roads lead to Rome problem"). Signed-off-by: Dan

re: Input: cyttsp4 - SPI driver for Cypress TMA4XX touchscreen devices

2013-07-02 Thread Dan Carpenter
t; 255) => (0-255 > 255)'" drivers/input/touchscreen/cyttsp4_spi.c 66 if (reg > 255) ^ "reg" is unsigned char so 255 is the max it can be. 67 wr_buf[0] = op + CY_SPI_A8_BIT; 68 else 69

Re: Input: cyttsp4 - SPI driver for Cypress TMA4XX touchscreen devices

2013-07-03 Thread Dan Carpenter
On Wed, Jul 03, 2013 at 04:24:18PM +0300, Ferruh Yigit wrote: > I have a patch for this, but should I create it against previous patch I > have sent or against latest next tree? > Latest linux-next. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscri

Re: [patch 3/3] Input: cyttsp4 - leak on error path in probe()

2013-07-03 Thread Dan Carpenter
On Wed, Jul 03, 2013 at 04:12:48PM +0300, Ferruh Yigit wrote: > On 07/03/2013 12:44 AM, Dan Carpenter wrote: > >We leak "cd" if the cd->xfer_buf allocation fails. It was weird to > >"goto error_gpio_irq" so I changed the label name. (Label names should >

Re: [PATCH 1/1] Drivers: input: serio: New driver to support Hyper-V synthetic keyboard

2013-09-16 Thread Dan Carpenter
ret = -ENODEV; > + goto cleanup; Just return -ENODEV; > + } > + return 0; > + > +cleanup: > + return ret; > +} > + > +static int hv_kbd_probe(struct hv_device *device, > + const struct hv_vmbus_device_id *de

Re: [PATCH 1/1] Drivers: input: serio: New driver to support Hyper-V synthetic keyboard

2013-09-16 Thread Dan Carpenter
"bytes_recvd". It's not complicated. If you have a different place where the guest does this then tell me which function to look at. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 1/1] Drivers: input: serio: New driver to support Hyper-V synthetic keyboard

2013-09-16 Thread Dan Carpenter
Just roll something like the following into your patch. regards, dan carpenter diff --git a/drivers/input/serio/hyperv-keyboard.c b/drivers/input/serio/hyperv-keyboard.c index 0d4625f..262721b 100644 --- a/drivers/input/serio/hyperv-keyboard.c +++ b/drivers/input/serio/hyperv-keyboard.c

Re: [PATCH 1/1] Drivers: input: serio: New driver to support Hyper-V synthetic keyboard

2013-09-16 Thread Dan Carpenter
Look at the function vmbus_recvpacket_raw() in > drivers/hv/channel.c. > I'm confused. There is no mention of ->offset8 in vmbus_recvpacket_raw(). It's a good idea to add a check there but the lower levels don't know about the sizeof(synth_kbd_protocol_response) so we would stil

Re: [v3.11][Regression] HID: hyperv: convert alloc+memcpy to memdup

2013-09-16 Thread Dan Carpenter
one now and will provide the results. The two bugs are the same it's that the code has shifted a little. Mark the commit as buggy and continue with the git bisect. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the

Re: [v3.11][Regression] HID: hyperv: convert alloc+memcpy to memdup

2013-09-16 Thread Dan Carpenter
On Mon, Sep 16, 2013 at 04:49:29PM -0400, Joseph Salisbury wrote: > On 09/16/2013 04:38 PM, Dan Carpenter wrote: > > On Mon, Sep 16, 2013 at 01:42:35PM -0400, Joseph Salisbury wrote: > >> Reverting the patch changes the driver back to useing kzalloc() and > >> memcpy()

Re: [PATCH 1/1] Drivers: input: serio: New driver to support Hyper-V synthetic keyboard

2013-09-16 Thread Dan Carpenter
On Mon, Sep 16, 2013 at 09:55:44PM +, KY Srinivasan wrote: > > > > -Original Message- > > From: Dan Carpenter [mailto:dan.carpen...@oracle.com] > > Sent: Monday, September 16, 2013 1:13 PM > > To: KY Srinivasan > > Cc: o...@aepfle.de; gre...@linu

Re: [v3.11][Regression] HID: hyperv: convert alloc+memcpy to memdup

2013-09-27 Thread Dan Carpenter
n this mail: > > > > Message-ID: <5241992e.3090...@canonical.com> > > Date: Tue, 24 Sep 2013 09:52:46 -0400 > > > > you said that reverting this commit doesn't prevent the lockups, so I am > > rather confused ... ? > > > > T

Re: [v3.11][Regression] HID: hyperv: convert alloc+memcpy to memdup

2013-09-27 Thread Dan Carpenter
On Fri, Sep 27, 2013 at 06:24:12PM +0300, Dan Carpenter wrote: > > It looks like magicmouse_raw_event() returns 1 on success and 0 on > failure. Fixing the return codes is a good idea but it won't fix the oops. What's the point of returning 1 and 0? In the current code no

Re: [v3.11][Regression] HID: hyperv: convert alloc+memcpy to memdup

2013-09-30 Thread Dan Carpenter
On Mon, Sep 30, 2013 at 04:35:47PM +0200, Jiri Kosina wrote: > On Fri, 27 Sep 2013, Dan Carpenter wrote: > > > It looks like magicmouse_raw_event() returns 1 on success and 0 on > > failure. > > Good catch indeed. > > I am not completely sure whether we are

[patch] HID: logitech-dj: small cleanup in rdcat()

2013-10-19 Thread Dan Carpenter
We could pass the "rdsec" pointer instead of the address of the "rdesc" and it's a little simpler. Signed-off-by: Dan Carpenter diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c index 2e53024..a7947d8 100644 --- a/drivers/hid/hid-logitech-d

[patch] Input: tnetv107x-keypad - make irqs signed for error handling

2013-11-06 Thread Dan Carpenter
hese irq variables are unsigned so the error handling doesn't work. I've changed them to signed values. Signed-off-by: Dan Carpenter diff --git a/drivers/input/keyboard/tnetv107x-keypad.c b/drivers/input/keyboard/tnetv107x-keypad.c index 5f7b427..8bd24d5 100644 --- a/drivers/input

[patch] Input: hp_sdc_rtc - unlock on error in hp_sdc_rtc_read_i8042timer()

2013-11-14 Thread Dan Carpenter
The transaction task here is hp_sdc_tasklet() and it releases the lock. The problem is if we aren't able to queue the transaction then we need to release the lock ourselves. Signed-off-by: Dan Carpenter diff --git a/drivers/input/misc/hp_sdc_rtc.c b/drivers/input/misc/hp_sdc_rtc.c index 86

re: HID: hid-multitouch: Switch to device groups

2012-08-08 Thread Dan Carpenter
r == HID_ANY_ID && id->product == HID_ANY_ID) ^^ New dereference removed a check. 736 mt_post_parse_default_settings(td); 737 regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-input" in

Re: HID: hid-multitouch: Switch to device groups

2012-08-08 Thread Dan Carpenter
leads to the following Smatch complaint: > > > > drivers/hid/hid-multitouch.c:735 mt_probe() > > error: we previously assumed 'id' could be null (see line 694) > > Yes, and the same patch also removes the reason 'id' could be null. Great. Could you r

re: Input: eeti_ts: pass gpio value instead of IRQ

2012-08-10 Thread Dan Carpenter
goto err1; 208 209 if (pdata) ^ Old check. 210 priv->irq_active_high = pdata->irq_active_high; 211 regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a

[patch] HID: picoLCD: fix a NULL test in picolcd_raw_cir()

2012-09-06 Thread Dan Carpenter
Smatch complains that the NULL checking in this function is not consistent and could lead to a NULL dereference. The comments say that we should return here if rc_dev is NULL so I've changed the test to match the comment. Signed-off-by: Dan Carpenter --- Only needed in linux-next. This

[patch 1/2] HID: sensors: use GFP_ATOMIC under spinlock

2012-09-13 Thread Dan Carpenter
We're holding a spinlock here so we can't call kmalloc() with GFP_KERNEL. Signed-off-by: Dan Carpenter diff --git a/drivers/hid/hid-sensor-hub.c b/drivers/hid/hid-sensor-hub.c index 4ac759c..0c93b10 100644 --- a/drivers/hid/hid-sensor-hub.c +++ b/drivers/hid/hid-sensor-hub.c @@ -17

[patch 2/2] HID: sensors: remove some unneeded checks

2012-09-13 Thread Dan Carpenter
"report_id" is unsigned so it's never less than zero. These checks can be removed without any problem. Signed-off-by: Dan Carpenter diff --git a/drivers/hid/hid-sensor-hub.c b/drivers/hid/hid-sensor-hub.c index 0c93b10..22ec3c6 100644 --- a/drivers/hid/hid-sensor-hub.c +++ b/

[patch] HID: picoLCD: off by one in dump_buff_as_hex()

2012-09-14 Thread Dan Carpenter
We're placing the NUL terminator one character beyond the end of the buffer here. Signed-off-by: Dan Carpenter --- This change obviously don't make the code worse, but I'm not positive it's the right fix. I'm not sure the lines before are doing the right thing eithe

Re: [patch] HID: picoLCD: off by one in dump_buff_as_hex()

2012-09-22 Thread Dan Carpenter
ith #defined buffer size I don't think that would > be needed. > Sorry for the delay. Looks good to me. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[patch] Input: wacom - fix a check for WACOM_24HDT

2012-10-29 Thread Dan Carpenter
The current condition is always true. From the context, it looks like we should be checking if ->type == WACOM_24HDT. Signed-off-by: Dan Carpenter diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c index 2c1e12b..858ad44 100644 --- a/drivers/input/tab

[patch] Input: pxa27x_keypad - remove an unneeded NULL check

2015-02-11 Thread Dan Carpenter
Static checkers complain about this NULL check because we dereference it without checking a couple lines later. This function is only called when "keypad->pdata" is non-NULL so we can just delete the NULL test. Signed-off-by: Dan Carpenter diff --git a/drivers/input/keyboard/pxa27

re: HID: usbhid: Check HID report descriptor contents after device reset

2015-02-27 Thread Dan Carpenter
int ret = hid->driver->reset_resume(hid); 1593 if (ret < 0) 1594 status = ret; Maybe the ->reset_resume() can succeed even though hid_post_reset() failed? In that case, we return the "1" error code and print it in dmesg in

[patch] Input: sx8654 - signedness bug in sx8654_irq()

2015-03-11 Thread Dan Carpenter
"irqsrc" needs to be signed for the error handling to work. Signed-off-by: Dan Carpenter diff --git a/drivers/input/touchscreen/sx8654.c b/drivers/input/touchscreen/sx8654.c index 8e531ac..aecb9ad 100644 --- a/drivers/input/touchscreen/sx8654.c +++ b/drivers/input/touchscreen/sx8654.

re: HID: wacom: check for wacom->shared before following the pointer

2015-03-19 Thread Dan Carpenter
are is always quirky so this won't cause a NULL deref? 1105 int slot = input_mt_get_slot_by_key(input, data[offset + 1]); 1106 1107 if (slot < 0) 1108 continue; regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: HID: wacom: check for wacom->shared before following the pointer

2015-03-19 Thread Dan Carpenter
UIRK_MULTI_INPUT, so wacom->shared can > not be null. I wonder what we could put in the code to make static > checkers happy... The static checker doesn't complain about this, I was just wondering. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscr

re: power_supply: Change ownership from driver to core

2015-03-23 Thread Dan Carpenter
gt;dev); Dereferenced inside function call. 458 459 out: 460 return true; 461 } regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: power_supply: Change ownership from driver to core

2015-03-23 Thread Dan Carpenter
On Mon, Mar 23, 2015 at 04:21:48PM +0100, Krzysztof Kozlowski wrote: > On pon, 2015-03-23 at 17:54 +0300, Dan Carpenter wrote: > > Hello Krzysztof Kozlowski, > > > > The patch 297d716f6260: "power_supply: Change ownership from driver > > to core" from Mar 12

[patch] HID: i2c-hid: fix harmless test_bit() issue

2015-05-14 Thread Dan Carpenter
atic checkers will complain. Fixes: 4a200c3b9a40 ('HID: i2c-hid: introduce HID over i2c specification implementation') Signed-off-by: Dan Carpenter diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c index 92d6cdf..cadec6a 100644 --- a/drivers/hid/i2c-hid/i2c-hid.

re: usbtouchscreen: version 0.4

2015-06-06 Thread Dan Carpenter
t;buf_len); 1354 if (pkt_len < 0) 1355 return; 1356 } 1357 1358 /* append */ 1359 tmp = pkt_len - usbtouch->buf_len; regards, dan carpenter -- To unsubscribe from this list: s

Re: usbtouchscreen: version 0.4

2015-06-07 Thread Dan Carpenter
Ah, I'm amazed your still responding to emails about this ancient driver. :) Thanks for the explanation. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majord...@vger.kernel.org More majordom

[patch] HID: wacom: NULL dereferences on error in probe()

2015-06-24 Thread Dan Carpenter
We can't pass a NULL to input_unregister_device(). Fixes: 2a6cdbdd4cc0 ('HID: wacom: Introduce new 'touch_input' device') Signed-off-by: Dan Carpenter diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c index 4c0ffca..44958d7 100644 --- a/drivers/hid/waco

Re: [PATCH] i2c-HID: Delete unnecessary checks before the function call "gpiod_put"

2015-07-09 Thread Dan Carpenter
This one deserves some extra review because it introduces a call to: WARN_ON(extra_checks); in gpiod_free(). That may or may not matter... regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message

re: [PATCH] drivers/input/joystick: convert to dynamic input_dev allocation

2015-07-28 Thread Dan Carpenter
t_dev, ABS_X, -1, 1, 0, 0); 232 input_set_abs_params(input_dev, ABS_Y, -1, 1, 0, 0); 233 234 for (j = 0; j < n_buttons[i]; j++) 235 set_bit(tgfx_buttons[j], input_dev->keybit);

[patch] HID: uclogic: fix limit in uclogic_tablet_enable()

2015-07-29 Thread Dan Carpenter
The limit should be ARRAY_SIZE(params) (5 elements) here instead of sizeof(params) (20 bytes). Fixes: 08177f40bd00 ('HID: uclogic: merge hid-huion driver in hid-uclogic') Signed-off-by: Dan Carpenter diff --git a/drivers/hid/hid-uclogic.c b/drivers/hid/hid-uclogic.c index 941673

Re: [PATCH] drivers/input/joystick: convert to dynamic input_dev allocation

2015-07-30 Thread Dan Carpenter
Looks good to me. Thanks! regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[patch] Input: sentelic - silence some underflow warnings

2015-08-21 Thread Dan Carpenter
by making these variables unsigned. Signed-off-by: Dan Carpenter diff --git a/drivers/input/mouse/sentelic.c b/drivers/input/mouse/sentelic.c index cc7e0d4..11c32ac 100644 --- a/drivers/input/mouse/sentelic.c +++ b/drivers/input/mouse/sentelic.c @@ -432,7 +432,7 @@ static int fsp_onpad_hscr(stru

[patch] Input: ff-core - silence an underflow warning

2015-09-22 Thread Dan Carpenter
u16 value, but we may as well fix it just to make the static checker happy. Signed-off-by: Dan Carpenter diff --git a/drivers/input/ff-core.c b/drivers/input/ff-core.c index c642082..6a94c5f 100644 --- a/drivers/input/ff-core.c +++ b/drivers/input/ff-core.c @@ -273,14 +273,14 @@ int input_ff_event

Re: [patch] Input: ff-core - silence an underflow warning

2015-09-29 Thread Dan Carpenter
On Mon, Sep 28, 2015 at 05:28:30PM -0700, Dmitry Torokhov wrote: > On Tue, Sep 22, 2015 at 04:26:43PM +0300, Dan Carpenter wrote: > > My static checker complains that "value" comes from the user in > > evdev_do_ioctl() and we check that it's not too large here bu

re: Input: edt-ft5x06 - switch to newer gpio framework

2015-09-29 Thread Dan Carpenter
vice_init_wakeup(&client->dev, 1); 987 988 dev_dbg(&client->dev, 989 "EDT FT5x06 initialized: IRQ %d, WAKE pin %d, Reset pin %d.\n", 990 client->irq, desc_to_gpio(tsdata->wake_gpio), ^ Patch introduces a new unchecked dereference, (inside the function call). regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

re: Input: gamecon - use parallel port device model

2015-10-01 Thread Dan Carpenter
. I guess we could change the other condition to be: if (count == 0 || i == GC_MAX_PORTS) goto err_free_gc; 989 return; 990 regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a mes

Re: [patch] Input: ff-core - silence an underflow warning

2015-10-01 Thread Dan Carpenter
On Tue, Sep 29, 2015 at 04:03:15PM -0700, Dmitry Torokhov wrote: > That's fine, I'll adjust on my side. Thanks! regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majord...@vger.kernel.org More

re: Input: joydev - validate axis/button maps before clobbering current ones

2015-10-06 Thread Dan Carpenter
joydev->absmap[joydev->abspam[i]] = i; 464 465 out: 466 kfree(abspam); 467 return retval; 468 } regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Input: joydev - validate axis/button maps before clobbering current ones

2015-10-06 Thread Dan Carpenter
Oh whoops, I sent this to the wrong person. Javier, you introduced a bug with 570c9a7a ('Input: joydev - use memdup_user() to duplicate memory from user-space') regards, dan carpenter On Tue, Oct 06, 2015 at 10:57:26PM +0200, Stephen Kitt wrote: > Hello Dan, > > On Tue,

Re: Input: joydev - validate axis/button maps before clobbering current ones

2015-10-07 Thread Dan Carpenter
Fantastic. Thanks! regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[patch] HID: wacom: bitwise vs logical ORs

2015-12-09 Thread Dan Carpenter
Smatch complains that these should probably be bitwise ORs instead of logical. It doesn't matter for "prox" but it makes a difference for "strip1" and "strip2". Fixes: c7f0522a1ad1 ('HID: wacom: Slim down wacom_intuos_pad processing') Signed-off

[patch] Input: egalax: potential NULL dereference on error

2015-12-19 Thread Dan Carpenter
We didn't check input_allocate_device() for failures so it could lead to a NULL deref. Fixes: 6b0f8f9c52ef ('Input: add eGalaxTouch serial touchscreen driver') Signed-off-by: Dan Carpenter diff --git a/drivers/input/touchscreen/egalax_ts_serial.c b/drivers/input/touchscreen/ega

Re: [patch] Input: egalax: potential NULL dereference on error

2015-12-19 Thread Dan Carpenter
On Sat, Dec 19, 2015 at 12:04:56PM +0100, Julia Lawall wrote: > On Sat, 19 Dec 2015, Dan Carpenter wrote: > > > We didn't check input_allocate_device() for failures so it could lead to > > a NULL deref. > > The patch does several other things... Not really.