diff options
author | Julia Lawall <Julia.Lawall@lip6.fr> | 2016-09-06 16:51:15 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-10-21 16:09:32 +0200 |
commit | fa44d3b9e785327eef8182eae5ae7d463b9cbcba (patch) | |
tree | 4dd368f44247e58c83774865323098113b5611c8 | |
parent | [media] vcodec: mediatek: Add Mediatek VP9 Video Decoder Driver (diff) | |
download | linux-fa44d3b9e785327eef8182eae5ae7d463b9cbcba.tar.xz linux-fa44d3b9e785327eef8182eae5ae7d463b9cbcba.zip |
[media] vcodec: mediatek: fix odd_ptr_err.cocci warnings
PTR_ERR should access the value just tested by IS_ERR
Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci
CC: Tiffany Lin <tiffany.lin@mediatek.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
-rw-r--r-- | drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c index 70aa99329ce5..d48287c727f4 100644 --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c @@ -255,7 +255,7 @@ static int mtk_vcodec_probe(struct platform_device *pdev) } dev->reg_base[i] = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR((__force void *)dev->reg_base[i])) { - ret = PTR_ERR((__force void *)dev->reg_base); + ret = PTR_ERR((__force void *)dev->reg_base[i]); goto err_res; } mtk_v4l2_debug(2, "reg[%d] base=%p", i, dev->reg_base[i]); |