Re: [PATCH] ion: hisilicon: check the right value after ion_heap_create

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/04/2017 07:45 AM, Yisheng Xie wrote:
> From: Yisheng Xie <xieyisheng1@xxxxxxxxxx>
> 
> 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@xxxxxxxxxx>
> ---
>  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.

Thanks,
Laura
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux