diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2013-05-29 05:10:00 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-06-03 20:57:09 +0200 |
commit | d1c1cc664342cf197afeea4b0dd8145d1edee35c (patch) | |
tree | 0c461e70838dcc91e349134ff9dcd061d540d77c /drivers | |
parent | [media] s5p-mfc: added missing end-of-lines in debug messages (diff) | |
download | linux-d1c1cc664342cf197afeea4b0dd8145d1edee35c.tar.xz linux-d1c1cc664342cf197afeea4b0dd8145d1edee35c.zip |
[media] s5p-mfc: Add NULL check for allocated buffer
In certain cases, dma_alloc_coherent returns NULL. Add check for
NULL pointer.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c b/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c index 2e5f30b40dea..dc1fc94a488d 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c @@ -38,7 +38,7 @@ int s5p_mfc_alloc_firmware(struct s5p_mfc_dev *dev) dev->fw_virt_addr = dma_alloc_coherent(dev->mem_dev_l, dev->fw_size, &dev->bank1, GFP_KERNEL); - if (IS_ERR(dev->fw_virt_addr)) { + if (IS_ERR_OR_NULL(dev->fw_virt_addr)) { dev->fw_virt_addr = NULL; mfc_err("Allocating bitprocessor buffer failed\n"); return -ENOMEM; |