From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753221AbdEEPon (ORCPT ); Fri, 5 May 2017 11:44:43 -0400 Received: from mail-qt0-f176.google.com ([209.85.216.176]:34032 "EHLO mail-qt0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751429AbdEEPol (ORCPT ); Fri, 5 May 2017 11:44:41 -0400 Subject: Re: [PATCH] ion: hisilicon: check the right value after ion_heap_create To: Yisheng Xie , Yisheng Xie , sumit.semwal@linaro.org, gregkh@linuxfoundation.org, arve@android.com, riandrews@android.com, wporter82@gmail.com References: <1493909133-3868-1-git-send-email-ysxie@foxmail.com> <43fbdb96-78ed-2429-2ead-e79081b2a6fb@redhat.com> <6d0407c8-dea4-1b60-772b-304632f49486@huawei.com> Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org From: Laura Abbott Message-ID: <20e95f57-e453-4901-2afa-2d0c9ee59127@redhat.com> Date: Fri, 5 May 2017 08:44:37 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <6d0407c8-dea4-1b60-772b-304632f49486@huawei.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/04/2017 08:32 PM, Yisheng Xie wrote: > Hi Laura, > > On 2017/5/5 1:47, Laura Abbott wrote: >> On 05/04/2017 07:45 AM, Yisheng Xie wrote: >>> From: Yisheng Xie >>> >>> 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 >>> --- >>> 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 > Thanks for letting me know. Feel free to submit a patch to remove it. Thanks, Laura