drm/msm/dpu: Fix uninitialized variable
There is a possibility for an uninitialized *ret* variable to be
returned in some code paths.
Fix this by initializing *ret* to 0.
Addresses-Coverity-ID: 1642546 ("Uninitialized scalar variable")
Fixes: 774bcfb731
("drm/msm/dpu: add support for virtual planes")
Signed-off-by: Ethan Carter Edwards <ethan@ethancedwards.com>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Patchwork: https://patchwork.freedesktop.org/patch/636201/
Link: https://lore.kernel.org/r/20250209-dpu-v2-1-114dfd4ebefd@ethancedwards.com
Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
This commit is contained in:
parent
df9cf852ca
commit
978ca99d6b
1 changed files with 3 additions and 4 deletions
|
@ -1164,7 +1164,6 @@ int dpu_assign_plane_resources(struct dpu_global_state *global_state,
|
|||
unsigned int num_planes)
|
||||
{
|
||||
unsigned int i;
|
||||
int ret;
|
||||
|
||||
for (i = 0; i < num_planes; i++) {
|
||||
struct drm_plane_state *plane_state = states[i];
|
||||
|
@ -1173,13 +1172,13 @@ int dpu_assign_plane_resources(struct dpu_global_state *global_state,
|
|||
!plane_state->visible)
|
||||
continue;
|
||||
|
||||
ret = dpu_plane_virtual_assign_resources(crtc, global_state,
|
||||
int ret = dpu_plane_virtual_assign_resources(crtc, global_state,
|
||||
state, plane_state);
|
||||
if (ret)
|
||||
break;
|
||||
return ret;
|
||||
}
|
||||
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void dpu_plane_flush_csc(struct dpu_plane *pdpu, struct dpu_sw_pipe *pipe)
|
||||
|
|
Loading…
Add table
Reference in a new issue