mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-07 09:55:19 +02:00
drm/amd/display: Fix Coverity INTEGER_OVERFLOW within dal_gpio_service_create
[ Upstream commit c6077aa66f
]
[Why]
For subtraction, coverity reports integer overflow
warning message when variable type is uint32_t.
[How]
Change variable type to int32_t.
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Acked-by: Tom Chung <chiahsuan.chung@amd.com>
Signed-off-by: Hersen Wu <hersenxs.wu@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
13faa9d401
commit
313d3dd4ca
|
@ -56,7 +56,7 @@ struct gpio_service *dal_gpio_service_create(
|
|||
struct dc_context *ctx)
|
||||
{
|
||||
struct gpio_service *service;
|
||||
uint32_t index_of_id;
|
||||
int32_t index_of_id;
|
||||
|
||||
service = kzalloc(sizeof(struct gpio_service), GFP_KERNEL);
|
||||
|
||||
|
@ -112,7 +112,7 @@ struct gpio_service *dal_gpio_service_create(
|
|||
return service;
|
||||
|
||||
failure_2:
|
||||
while (index_of_id) {
|
||||
while (index_of_id > 0) {
|
||||
--index_of_id;
|
||||
kfree(service->busyness[index_of_id]);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user