[PATCH] staging: most: hdm-dim2: Remove possible dereference error

Amitoj Kaur Chawla amitoj1606 at gmail.com
Fri Mar 18 17:12:18 UTC 2016


On Fri, Mar 18, 2016 at 7:44 PM, Andrey Shvetsov
<andrey.shvetsov.ml at gmail.com> wrote:
> On Fri, Mar 18, 2016 at 06:32:15PM +0530, Amitoj Kaur Chawla wrote:
>> Commit 3eced21a5afb ("staging: most: hdm-dim2: Replace request_irq
>> with devm_request_irq") introduced the following static checker
>> warning:
>> drivers/staging/most/hdm-dim2/dim2_hdm.c:841 dim2_probe()
>> error: 'dev->netinfo_task' dereferencing possible ERR_PTR()
>>
>> Remove the warning by returning PTR_ERR immediately rather than
>> storing in a variable and returning at the end of the function
>> since we do not need to free anything.
> This patch is not about a warning.
>
> This patch fixes the bug introduced in the previous patch that has
> changed the control flow so that the error code returned by the
> kthread_run was overwritten by the "ret = dim2_sysfs_probe" below.
>
> regards
> andy

I'll revise the commit message and resend.

Thanks,
Amitoj


More information about the devel mailing list