Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1635838
| From | Yisheng Xie <ysxie@foxmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] ion: hisilicon: check the right value after ion_heap_create |
| Date | 2017-05-04 17:30 +0200 |
| Message-ID | <tDqRz-5hr-1@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
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;
}
--
1.9.1
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] ion: hisilicon: check the right value after ion_heap_create Yisheng Xie <ysxie@foxmail.com> - 2017-05-04 17:30 +0200
Re: [PATCH] ion: hisilicon: check the right value after ion_heap_create Laura Abbott <labbott@redhat.com> - 2017-05-04 19:50 +0200
Re: [PATCH] ion: hisilicon: check the right value after ion_heap_create Yisheng Xie <xieyisheng1@huawei.com> - 2017-05-05 05:40 +0200
Re: [PATCH] ion: hisilicon: check the right value after ion_heap_create Laura Abbott <labbott@redhat.com> - 2017-05-05 17:50 +0200
csiph-web