lkml.org 
[lkml]   [2019]   [Dec]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: Re: [PATCH v2] drivers/hid/hid-multitouch.c: fix a possible null pointer access.
Date
On Tue, Dec 17, 2019 at 18:50 PM Benjamin Tissoires <benjamin.tissoires@redhat.com> wrote:

>Can you add at the beginning of your commit message:
>From: Pan Zhang <zhangpan26@huawei.com>
>
>This way we have the commit author that matches the signature, which is a requirement for the kernel.

Firstly, thanks for your reviewing very much. I would fix my signature.

>> drivers/hid/hid-multitouch.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/hid/hid-multitouch.c
>> b/drivers/hid/hid-multitouch.c index 3cfeb16..368de81 100644
>> --- a/drivers/hid/hid-multitouch.c
>> +++ b/drivers/hid/hid-multitouch.c
>> @@ -1019,7 +1019,7 @@ static int mt_process_slot(struct mt_device *td, struct input_dev *input,
>> tool = MT_TOOL_DIAL;
>> else if (unlikely(!confidence_state)) {
>> tool = MT_TOOL_PALM;
>> - if (!active &&
>> + if (!active && mt

>Ack on the principle, but this doesn't even compile. You are missing a `&&` at the end of the line.
>
>Can you send a v2 with the comments above? And we will queue the v2 for 5.5 I think.

Sorry about that. I made a stupid mistake. This patch fixed it.

Signed-off-by: Pan Zhang <zhangpan26@huawei.com>
---
drivers/hid/hid-multitouch.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
index 3cfeb16..368de81 100644
--- a/drivers/hid/hid-multitouch.c
+++ b/drivers/hid/hid-multitouch.c
@@ -1019,7 +1019,7 @@ static int mt_process_slot(struct mt_device *td, struct input_dev *input,
tool = MT_TOOL_DIAL;
else if (unlikely(!confidence_state)) {
tool = MT_TOOL_PALM;
- if (!active &&
+ if (!active && mt &&
input_mt_is_active(&mt->slots[slotnum])) {
/*
* The non-confidence was reported for
--
2.7.4
\
 
 \ /
  Last update: 2019-12-17 13:29    [W:0.038 / U:2.540 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site