Commit c4abb192 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

media: mtk-vpu: fix two smatch warnings

Drop the "id >= 0" test in two conditions to fix these warnings:

drivers/media/platform/mtk-vpu/mtk_vpu.c:276 vpu_ipi_register() warn: always true condition '(id >= 0) => (0-u32max >= 0)'
drivers/media/platform/mtk-vpu/mtk_vpu.c:401 vpu_wdt_reg_handler() warn: always true condition '(id >= 0) => (0-u32max >= 0)'
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent 6a8c521c
...@@ -273,7 +273,7 @@ int vpu_ipi_register(struct platform_device *pdev, ...@@ -273,7 +273,7 @@ int vpu_ipi_register(struct platform_device *pdev,
return -EPROBE_DEFER; return -EPROBE_DEFER;
} }
if (id >= 0 && id < IPI_MAX && handler) { if (id < IPI_MAX && handler) {
ipi_desc = vpu->ipi_desc; ipi_desc = vpu->ipi_desc;
ipi_desc[id].name = name; ipi_desc[id].name = name;
ipi_desc[id].handler = handler; ipi_desc[id].handler = handler;
...@@ -398,7 +398,7 @@ int vpu_wdt_reg_handler(struct platform_device *pdev, ...@@ -398,7 +398,7 @@ int vpu_wdt_reg_handler(struct platform_device *pdev,
handler = vpu->wdt.handler; handler = vpu->wdt.handler;
if (id >= 0 && id < VPU_RST_MAX && wdt_reset) { if (id < VPU_RST_MAX && wdt_reset) {
dev_dbg(vpu->dev, "wdt register id %d\n", id); dev_dbg(vpu->dev, "wdt register id %d\n", id);
mutex_lock(&vpu->vpu_mutex); mutex_lock(&vpu->vpu_mutex);
handler[id].reset_func = wdt_reset; handler[id].reset_func = wdt_reset;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment