drm/mediatek: Remove less-than-zero comparison of an unsigned value

[ Upstream commit 4ed9dd7fde ]

Fix a Coverity error that less-than-zero comparison of an unsigned value
is never true.

Fixes: 119f517362 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Hsiao Chien Sung 2024-06-14 11:49:37 +08:00 committed by Greg Kroah-Hartman
parent c327a4fafe
commit 016accce9d

View File

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