]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/mediatek: Remove less-than-zero comparison of an unsigned value
authorHsiao Chien Sung <shawn.sung@mediatek.com>
Fri, 14 Jun 2024 03:49:37 +0000 (11:49 +0800)
committerChun-Kuang Hu <chunkuang.hu@kernel.org>
Thu, 27 Jun 2024 13:46:22 +0000 (13:46 +0000)
Fix a Coverity error that less-than-zero comparison of an unsigned value
is never true.

Fixes: 119f5173628a ("drm/mediatek: Add DRM Driver for Mediatek SoC MT8173.")
Signed-off-by: Hsiao Chien Sung <shawn.sung@mediatek.com>
Reviewed-by: CK Hu <ck.hu@mediatek.com>
Link: https://patchwork.kernel.org/project/dri-devel/patch/20240614034937.23978-1-shawn.sung@mediatek.com/
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
drivers/gpu/drm/mediatek/mtk_ddp_comp.c

index 17b0364112922af35dfe10f2e1d818b3fe0478c3..a66e46d0b45ebb47b292f6cccf3b58b6652c4431 100644 (file)
@@ -593,7 +593,7 @@ int mtk_ddp_comp_init(struct device_node *node, struct mtk_ddp_comp *comp,
        int ret;
 #endif
 
-       if (comp_id < 0 || comp_id >= DDP_COMPONENT_DRM_ID_MAX)
+       if (comp_id >= DDP_COMPONENT_DRM_ID_MAX)
                return -EINVAL;
 
        type = mtk_ddp_matches[comp_id].type;