mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yisheng Xie <xieyisheng1@huawei.com>
To: Laura Abbott <labbott@redhat.com>,
	Yisheng Xie <ysxie@foxmail.com>, <sumit.semwal@linaro.org>,
	<gregkh@linuxfoundation.org>, <arve@android.com>,
	<riandrews@android.com>, <wporter82@gmail.com>
Cc: <devel@driverdev.osuosl.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ion: hisilicon: check the right value after ion_heap_create
Date: Fri, 5 May 2017 11:32:40 +0800	[thread overview]
Message-ID: <6d0407c8-dea4-1b60-772b-304632f49486@huawei.com> (raw)
In-Reply-To: <43fbdb96-78ed-2429-2ead-e79081b2a6fb@redhat.com>

Hi Laura,

On 2017/5/5 1:47, Laura Abbott wrote:
> On 05/04/2017 07:45 AM, Yisheng Xie wrote:
>> From: Yisheng Xie <xieyisheng1@huawei.com>
>>
>> It should check ipdev->heaps[i] whether it is error or null instead of
>> ipdev->heaps, after ion_heap_create() for ipdev->heaps[i].
>>
>> Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com>
>> ---
>>  drivers/staging/android/ion/hisilicon/hi6220_ion.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/staging/android/ion/hisilicon/hi6220_ion.c b/drivers/staging/android/ion/hisilicon/hi6220_ion.c
>> index 0de7897..7f8eda5 100644
>> --- a/drivers/staging/android/ion/hisilicon/hi6220_ion.c
>> +++ b/drivers/staging/android/ion/hisilicon/hi6220_ion.c
>> @@ -66,7 +66,7 @@ static int hi6220_ion_probe(struct platform_device *pdev)
>>  
>>  	for (i = 0; i < ipdev->data->nr; i++) {
>>  		ipdev->heaps[i] = ion_heap_create(&ipdev->data->heaps[i]);
>> -		if (!ipdev->heaps) {
>> +		if (IS_ERR_OR_NULL(ipdev->heaps[i])) {
>>  			ion_destroy_platform_data(ipdev->data);
>>  			return -ENOMEM;
>>  		}
>>
> 
> This file was removed in a recent clean up series.
I see, but maybe you should clean up more totally, I mean you should also
remove ./drivers/staging/android/ion/devicetree.txt for it is also useless.

Thanks
Yisheng Xie

  reply	other threads:[~2017-05-05  3:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-04 14:45 Yisheng Xie
2017-05-04 17:47 ` Laura Abbott
2017-05-05  3:32   ` Yisheng Xie [this message]
2017-05-05 15:44     ` Laura Abbott

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6d0407c8-dea4-1b60-772b-304632f49486@huawei.com \
    --to=xieyisheng1@huawei.com \
    --cc=arve@android.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=labbott@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=riandrews@android.com \
    --cc=sumit.semwal@linaro.org \
    --cc=wporter82@gmail.com \
    --cc=ysxie@foxmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®