[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAO_48GHEu08nnmafK2pKEoadczHuAG0bV36p1Wtb+M7HcXC8Lw@mail.gmail.com>
Date: Fri, 16 Sep 2016 07:55:20 +0530
From: Sumit Semwal <sumit.semwal@...aro.org>
To: Laura Abbott <labbott@...hat.com>
Cc: Wei Yongjun <weiyj.lk@...il.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Arve Hj�nnev�g <arve@...roid.com>,
Riley Andrews <riandrews@...roid.com>, bhaktipriya96@...il.com,
yudongbin@...ilicon.com, puck.chen@...ilicon.com,
Wei Yongjun <weiyongjun1@...wei.com>,
devel@...verdev.osuosl.org, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH -next] staging: android: ion: Fix return value check in hi6220_ion_probe()
On 16 September 2016 at 07:40, Laura Abbott <labbott@...hat.com> wrote:
> On 09/14/2016 07:20 PM, Wei Yongjun wrote:
>>
>> From: Wei Yongjun <weiyongjun1@...wei.com>
>>
>> In case of error, the function ion_device_create() returns ERR_PTR() and
>> never returns NULL. The NULL test in the return value check should be
>> replaced with IS_ERR().
>>
>
> Acked-by: Laura Abbott <labbott@...hat.com>
>
Reviewed-by: Sumit Semwal <sumit.semwal@...aro.org>
>
>> Signed-off-by: Wei Yongjun <weiyongjun1@...wei.com>
>> ---
>> drivers/staging/android/ion/hisilicon/hi6220_ion.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/staging/android/ion/hisilicon/hi6220_ion.c
>> b/drivers/staging/android/ion/hisilicon/hi6220_ion.c
>> index f392db2..659aa71 100644
>> --- a/drivers/staging/android/ion/hisilicon/hi6220_ion.c
>> +++ b/drivers/staging/android/ion/hisilicon/hi6220_ion.c
>> @@ -49,8 +49,8 @@ static int hi6220_ion_probe(struct platform_device
>> *pdev)
>> platform_set_drvdata(pdev, ipdev);
>>
>> ipdev->idev = ion_device_create(NULL);
>> - if (!ipdev->idev)
>> - return -ENOMEM;
>> + if (IS_ERR(ipdev->idev))
>> + return PTR_ERR(ipdev->idev);
>>
>> ipdev->data = ion_parse_dt(pdev, hisi_heaps);
>> if (IS_ERR(ipdev->data))
>>
>>
>>
>
--
Thanks and regards,
Sumit Semwal
Linaro Mobile Group - Kernel Team Lead
Linaro.org │ Open source software for ARM SoCs
Powered by blists - more mailing lists