* [PATCH] staging: lirc: fix NULL pointer dereference
@ 2014-04-02 8:18 Daeseok Youn
2014-04-02 9:13 ` Dan Carpenter
0 siblings, 1 reply; 4+ messages in thread
From: Daeseok Youn @ 2014-04-02 8:18 UTC (permalink / raw)
To: m.chehab
Cc: gregkh, jarod, dan.carpenter, paulmck, mtrompou, bernat.ada,
linux-media, devel, linux-kernel
coccicheck says:
drivers/staging/media/lirc/lirc_igorplugusb.c:226:15-21:
ERROR: ir is NULL but dereferenced.
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
---
drivers/staging/media/lirc/lirc_igorplugusb.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/media/lirc/lirc_igorplugusb.c b/drivers/staging/media/lirc/lirc_igorplugusb.c
index f508a13..0ef393b 100644
--- a/drivers/staging/media/lirc/lirc_igorplugusb.c
+++ b/drivers/staging/media/lirc/lirc_igorplugusb.c
@@ -223,8 +223,8 @@ static int unregister_from_lirc(struct igorplug *ir)
int devnum;
if (!ir) {
- dev_err(&ir->usbdev->dev,
- "%s: called with NULL device struct!\n", __func__);
+ printk(DRIVER_NAME "%s: called with NULL device struct!\n",
+ __func__);
return -EINVAL;
}
--
1.7.4.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: lirc: fix NULL pointer dereference
2014-04-02 8:18 [PATCH] staging: lirc: fix NULL pointer dereference Daeseok Youn
@ 2014-04-02 9:13 ` Dan Carpenter
2014-04-02 9:41 ` DaeSeok Youn
0 siblings, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2014-04-02 9:13 UTC (permalink / raw)
To: Daeseok Youn
Cc: m.chehab, devel, bernat.ada, gregkh, jarod, linux-kernel,
paulmck, mtrompou, linux-media
On Wed, Apr 02, 2014 at 05:18:39PM +0900, Daeseok Youn wrote:
>
> coccicheck says:
> drivers/staging/media/lirc/lirc_igorplugusb.c:226:15-21:
> ERROR: ir is NULL but dereferenced.
>
> Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
> ---
> drivers/staging/media/lirc/lirc_igorplugusb.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/media/lirc/lirc_igorplugusb.c b/drivers/staging/media/lirc/lirc_igorplugusb.c
> index f508a13..0ef393b 100644
> --- a/drivers/staging/media/lirc/lirc_igorplugusb.c
> +++ b/drivers/staging/media/lirc/lirc_igorplugusb.c
> @@ -223,8 +223,8 @@ static int unregister_from_lirc(struct igorplug *ir)
> int devnum;
>
> if (!ir) {
> - dev_err(&ir->usbdev->dev,
> - "%s: called with NULL device struct!\n", __func__);
> + printk(DRIVER_NAME "%s: called with NULL device struct!\n",
> + __func__);
It should be pr_err() or something. But actually "ir" can't be NULL so
just delete the whole condition.
> return -EINVAL;
> }
regards,
dan carpenter
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: lirc: fix NULL pointer dereference
2014-04-02 9:13 ` Dan Carpenter
@ 2014-04-02 9:41 ` DaeSeok Youn
2014-04-02 9:50 ` DaeSeok Youn
0 siblings, 1 reply; 4+ messages in thread
From: DaeSeok Youn @ 2014-04-02 9:41 UTC (permalink / raw)
To: Dan Carpenter
Cc: m.chehab, devel, Andreea Bernat, Greg KH, jarod, linux-kernel,
Paul McKenney, Martina Trompouki, linux-media
You are right. remove whole thing and send it again.
Thanks.
Daeseok Youn
2014-04-02 18:13 GMT+09:00 Dan Carpenter <dan.carpenter@oracle.com>:
> On Wed, Apr 02, 2014 at 05:18:39PM +0900, Daeseok Youn wrote:
>>
>> coccicheck says:
>> drivers/staging/media/lirc/lirc_igorplugusb.c:226:15-21:
>> ERROR: ir is NULL but dereferenced.
>>
>> Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
>> ---
>> drivers/staging/media/lirc/lirc_igorplugusb.c | 4 ++--
>> 1 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/staging/media/lirc/lirc_igorplugusb.c b/drivers/staging/media/lirc/lirc_igorplugusb.c
>> index f508a13..0ef393b 100644
>> --- a/drivers/staging/media/lirc/lirc_igorplugusb.c
>> +++ b/drivers/staging/media/lirc/lirc_igorplugusb.c
>> @@ -223,8 +223,8 @@ static int unregister_from_lirc(struct igorplug *ir)
>> int devnum;
>>
>> if (!ir) {
>> - dev_err(&ir->usbdev->dev,
>> - "%s: called with NULL device struct!\n", __func__);
>> + printk(DRIVER_NAME "%s: called with NULL device struct!\n",
>> + __func__);
>
>
> It should be pr_err() or something. But actually "ir" can't be NULL so
> just delete the whole condition.
>
>
>> return -EINVAL;
>> }
>
> regards,
> dan carpenter
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: lirc: fix NULL pointer dereference
2014-04-02 9:41 ` DaeSeok Youn
@ 2014-04-02 9:50 ` DaeSeok Youn
0 siblings, 0 replies; 4+ messages in thread
From: DaeSeok Youn @ 2014-04-02 9:50 UTC (permalink / raw)
To: m.chehab
Cc: Dan Carpenter, devel, Andreea Bernat, Greg KH, jarod,
linux-kernel, Paul McKenney, Martina Trompouki, linux-media
Please drop this patch.
I made a patch as Dan's comment and sent it.
Thanks.
Daeseok Youn.
2014-04-02 18:41 GMT+09:00 DaeSeok Youn <daeseok.youn@gmail.com>:
> You are right. remove whole thing and send it again.
>
> Thanks.
> Daeseok Youn
>
> 2014-04-02 18:13 GMT+09:00 Dan Carpenter <dan.carpenter@oracle.com>:
>> On Wed, Apr 02, 2014 at 05:18:39PM +0900, Daeseok Youn wrote:
>>>
>>> coccicheck says:
>>> drivers/staging/media/lirc/lirc_igorplugusb.c:226:15-21:
>>> ERROR: ir is NULL but dereferenced.
>>>
>>> Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
>>> ---
>>> drivers/staging/media/lirc/lirc_igorplugusb.c | 4 ++--
>>> 1 files changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/staging/media/lirc/lirc_igorplugusb.c b/drivers/staging/media/lirc/lirc_igorplugusb.c
>>> index f508a13..0ef393b 100644
>>> --- a/drivers/staging/media/lirc/lirc_igorplugusb.c
>>> +++ b/drivers/staging/media/lirc/lirc_igorplugusb.c
>>> @@ -223,8 +223,8 @@ static int unregister_from_lirc(struct igorplug *ir)
>>> int devnum;
>>>
>>> if (!ir) {
>>> - dev_err(&ir->usbdev->dev,
>>> - "%s: called with NULL device struct!\n", __func__);
>>> + printk(DRIVER_NAME "%s: called with NULL device struct!\n",
>>> + __func__);
>>
>>
>> It should be pr_err() or something. But actually "ir" can't be NULL so
>> just delete the whole condition.
>>
>>
>>> return -EINVAL;
>>> }
>>
>> regards,
>> dan carpenter
>>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-04-02 9:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-02 8:18 [PATCH] staging: lirc: fix NULL pointer dereference Daeseok Youn
2014-04-02 9:13 ` Dan Carpenter
2014-04-02 9:41 ` DaeSeok Youn
2014-04-02 9:50 ` DaeSeok Youn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).