linux/drivers/gpu/drm/rockchip
Dan Carpenter 40a8d7e492 drm/rockchip: Fix type promotion bug in rockchip_gem_iommu_map()
[ Upstream commit 6471da5ee3 ]

The "ret" variable is declared as ssize_t and it can hold negative error
codes but the "rk_obj->base.size" variable is type size_t.  This means
that when we compare them, they are both type promoted to size_t and the
negative error code becomes a high unsigned value and is treated as
success.  Add a cast to fix this.

Fixes: 38f993b7c5 ("drm/rockchip: Do not use DMA mapping API if attached to IOMMU domain")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/2bfa28b5-145d-4b9e-a18a-98819dd686ce@moroto.mountain
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2023-11-20 11:59:12 +01:00
..
analogix_dp-rockchip.c drm: Explicitly include correct DT includes 2023-07-21 09:12:43 +02:00
cdn-dp-core.c drm/rockchip: cdn-dp: Fix some error handling paths in cdn_dp_probe() 2023-11-20 11:59:12 +01:00
cdn-dp-core.h drm/rockchip: Embed drm_encoder into rockchip_decoder 2022-05-03 11:23:47 +02:00
cdn-dp-reg.c drm/rockchip: cdn-dp: fix sign extension on an int multiply for a u64 result 2021-05-28 20:27:44 +02:00
cdn-dp-reg.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 282 2019-06-05 17:36:37 +02:00
dw-mipi-dsi-rockchip.c drm: Explicitly include correct DT includes 2023-07-21 09:12:43 +02:00
dw_hdmi-rockchip.c drm/rockchip: Convert to platform remove callback returning void 2023-06-08 09:04:12 -07:00
inno_hdmi.c drm-misc-next for 6.6: 2023-07-27 10:49:57 +02:00
inno_hdmi.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 282 2019-06-05 17:36:37 +02:00
Kconfig drm/gem: rename GEM CMA helpers to GEM DMA helpers 2022-08-03 18:31:49 +02:00
Makefile drm/rockchip: Add VOP2 driver 2022-05-04 14:05:47 +02:00
rk3066_hdmi.c drm-misc-next for v6.6: 2023-07-17 15:37:57 +02:00
rk3066_hdmi.h drm: rockchip: introduce rk3066 hdmi 2019-03-31 14:24:30 +02:00
rockchip_drm_drv.c drm: Explicitly include correct DT includes 2023-07-21 09:12:43 +02:00
rockchip_drm_drv.h drm/fb-helper: Remove unnecessary include statements 2022-11-05 17:12:04 +01:00
rockchip_drm_fb.c drm/rockchip: Don't set struct drm_driver.output_poll_changed 2022-11-05 17:05:53 +01:00
rockchip_drm_fb.h drm: rockchip: remove rockchip_drm_framebuffer_init() function 2022-10-29 18:31:09 +02:00
rockchip_drm_gem.c drm/rockchip: Fix type promotion bug in rockchip_gem_iommu_map() 2023-11-20 11:59:12 +01:00
rockchip_drm_gem.h dma-buf-map: Rename to iosys-map 2022-02-07 16:35:35 -08:00
rockchip_drm_vop.c drm/rockchip: vop: Fix call to crtc reset helper 2023-11-20 11:59:08 +01:00
rockchip_drm_vop.h drm/rockchip: vop: limit maximum resolution to hardware capabilities 2023-03-09 01:14:24 +01:00
rockchip_drm_vop2.c drm/rockchip: vop2: Add missing call to crtc reset helper 2023-11-20 11:59:09 +01:00
rockchip_drm_vop2.h drm/rockchip: vop: limit maximum resolution to hardware capabilities 2023-03-09 01:14:24 +01:00
rockchip_lvds.c drm/rockchip: Convert to platform remove callback returning void 2023-06-08 09:04:12 -07:00
rockchip_lvds.h drm/rockchip: lvds: Add PX30 support 2020-01-06 11:56:02 +01:00
rockchip_rgb.c drm/rockchip: rgb: add video_port parameter to init function 2023-02-05 15:21:36 +01:00
rockchip_rgb.h drm/rockchip: rgb: add video_port parameter to init function 2023-02-05 15:21:36 +01:00
rockchip_vop2_reg.c drm/rockchip: Convert to platform remove callback returning void 2023-06-08 09:04:12 -07:00
rockchip_vop_reg.c drm/rockchip: Convert to platform remove callback returning void 2023-06-08 09:04:12 -07:00
rockchip_vop_reg.h drm/rockchip: define gamma registers for RK3399 2022-09-15 15:09:10 +02:00