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
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
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
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;
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
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
_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/
gen5_pip->resp_sort_func);
2564 if (gen5_pip->resp_len && length != 0) {
^^
Patch introduces a check.
2565 *gen5_pip->resp_len = length;
2566
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
;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
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
"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_
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
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
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
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
"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
^^^
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
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
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:
> >>>>>
_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
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:/
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 -
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
"*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
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.
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
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
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
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
>
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
"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
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
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
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
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()
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
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
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
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
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
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
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
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
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
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
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
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
"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/
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
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
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
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
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
"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.
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
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
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
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
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.
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
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
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
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
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);
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
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
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
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
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
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
. 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
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
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
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,
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
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
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
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.
79 matches
Mail list logo