1 From 971ec8a5c6229dc45b89105196a86333635fc553 Mon Sep 17 00:00:00 2001
2 From: Paul Elder <paul.elder@ideasonboard.com>
3 Date: Mon, 24 Aug 2020 17:14:29 +0900
4 Subject: [PATCH] staging: vc04_services: ISP: Fix dmabuf error check
7 In bcm2835_isp_s_ctrl, the error check for dma_buf_get() is incorrect,
8 and considers ERR_PTR pointers as valid dmabufs. Fix this error check.
10 Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
12 drivers/staging/vc04_services/bcm2835-isp/bcm2835-v4l2-isp.c | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
15 --- a/drivers/staging/vc04_services/bcm2835-isp/bcm2835-v4l2-isp.c
16 +++ b/drivers/staging/vc04_services/bcm2835-isp/bcm2835-v4l2-isp.c
17 @@ -733,7 +733,7 @@ static int bcm2835_isp_s_ctrl(struct v4l
18 sizeof(struct bcm2835_isp_lens_shading));
20 dmabuf = dma_buf_get(ls.dmabuf);
22 + if (IS_ERR_OR_NULL(dmabuf))
25 ret = vc_sm_cma_import_dmabuf(dmabuf,