From: Dan Carpenter Date: Thu, 20 May 2021 16:02:49 +0000 (+0200) Subject: media: hantro: test the correct variable in probe() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=66933f4b90ddd8abaa2e123e09c51ecc25331b40;p=linux.git media: hantro: test the correct variable in probe() This should be testing "vpu->clocks[0].clk" instead of "vpu->clocks". Fixes: eb4cacdfb998 ("media: hantro: add fallback handling for single irq/clk") Signed-off-by: Dan Carpenter Reviewed-by: Emil Velikov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/staging/media/hantro/hantro_drv.c b/drivers/staging/media/hantro/hantro_drv.c index 2f6b01c7a6a0f..4914987cfd9dd 100644 --- a/drivers/staging/media/hantro/hantro_drv.c +++ b/drivers/staging/media/hantro/hantro_drv.c @@ -783,8 +783,8 @@ static int hantro_probe(struct platform_device *pdev) * actual name in the DT bindings. */ vpu->clocks[0].clk = devm_clk_get(&pdev->dev, NULL); - if (IS_ERR(vpu->clocks)) - return PTR_ERR(vpu->clocks); + if (IS_ERR(vpu->clocks[0].clk)) + return PTR_ERR(vpu->clocks[0].clk); } num_bases = vpu->variant->num_regs ?: 1;