提交 d1c1cc66 编写于 作者: S Sachin Kamat 提交者: Mauro Carvalho Chehab

[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: NSachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: NKamil Debski <k.debski@samsung.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 4130eabc
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册