Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1477482
| From | Julia Lawall <julia.lawall@lip6.fr> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] vcodec: mediatek: fix odd_ptr_err.cocci warnings |
| Date | 2016-09-06 17:00 +0200 |
| Message-ID | <seq0V-3kC-15@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
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>
---
mtk_vcodec_dec_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- 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 platf
}
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]);
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] vcodec: mediatek: fix odd_ptr_err.cocci warnings Julia Lawall <julia.lawall@lip6.fr> - 2016-09-06 17:00 +0200 Re: [PATCH] vcodec: mediatek: fix odd_ptr_err.cocci warnings Tiffany Lin <tiffany.lin@mediatek.com> - 2016-09-07 07:30 +0200
csiph-web