drm/mediatek: Fix coverity issue with unintentional integer overflow
commit b0b0d811 upstream. 1. Instead of multiplying 2 variable of different types. Change to assign a value of one variable and then multiply the other variable. 2. Add a int variable for multiplier calculation instead of calculating different types multiplier with dma_addr_t variable directly. Fixes: 1a64a7af ("drm/mediatek: Fix cursor plane no update") Signed-off-by:Jason-JH.Lin <jason-jh.lin@mediatek.com> Reviewed-by:
Alexandre Mergnat <amergnat@baylibre.com> Reviewed-by:
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://patchwork.kernel.org/project/dri-devel/patch/20230907091425.9526-1-jason-jh.lin@mediatek.com/ Signed-off-by:
Chun-Kuang Hu <chunkuang.hu@kernel.org> [ For certain code segments with coverity issue do not exist in function mtk_plane_update_new_state(), those not present in v6.1 are not back ported. ] Signed-off-by:
Bin Lan <bin.lan.cn@windriver.com> Signed-off-by:
He Zhe <zhe.he@windriver.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Loading