All of lore.kernel.org
 help / color / mirror / Atom feed
* Coverity: pre_compute_mst_dsc_configs_for_state(): Uninitialized variables
@ 2022-11-18 16:50 ` coverity-bot
  0 siblings, 0 replies; 3+ messages in thread
From: coverity-bot @ 2022-11-18 16:50 UTC (permalink / raw)
  To: Lyude Paul
  Cc: Gustavo A. R. Silva, dri-devel, Roman Li, Hamza Mahfooz,
	David Airlie, Rodrigo Siqueira, amd-gfx, Alex Hung, Fangzhi Zuo,
	Aurabindo Pillai, Harry Wentland, Thomas Zimmermann, Leo Li,
	#v5.6+, Daniel Wheeler, hersen wu, Pan, Xinhui, linux-kernel,
	stable, Christian König, linux-next, Daniel Vetter,
	Wayne Lin, Alex Deucher, Nicholas Kazlauskas, linux-hardening

Hello!

This is an experimental semi-automated report about issues detected by
Coverity from a scan of next-20221118 as part of the linux-next scan project:
https://scan.coverity.com/projects/linux-next-weekly-scan

You're getting this email because you were associated with the identified
lines of code (noted below) that were touched by commits:

  Thu Nov 17 00:18:25 2022 -0500
    7cce4cd628be ("drm/amdgpu/mst: Stop ignoring error codes and deadlocking")

Coverity reported the following:

*** CID 1527373:  Uninitialized variables  (UNINIT)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c:1227 in pre_compute_mst_dsc_configs_for_state()
1221     		for (j = 0; j < dc_state->stream_count; j++) {
1222     			if (dc_state->streams[j]->link == stream->link)
1223     				computed_streams[j] = true;
1224     		}
1225     	}
1226
vvv     CID 1527373:  Uninitialized variables  (UNINIT)
vvv     Using uninitialized value "ret".
1227     	return ret;
1228     }
1229
1230     static int find_crtc_index_in_state_by_stream(struct drm_atomic_state *state,
1231     					      struct dc_stream_state *stream)
1232     {

If this is a false positive, please let us know so we can mark it as
such, or teach the Coverity rules to be smarter. If not, please make
sure fixes get into linux-next. :) For patches fixing this, please
include these lines (but double-check the "Fixes" first):

Reported-by: coverity-bot <keescook+coverity-bot@chromium.org>
Addresses-Coverity-ID: 1527373 ("Uninitialized variables")
Fixes: 7cce4cd628be ("drm/amdgpu/mst: Stop ignoring error codes and deadlocking")

If dc_state->stream_count is 0, "ret" is undefined. Perhaps initialize
it as -EINVAL?

Thanks for your attention!

-- 
Coverity-bot

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Coverity: pre_compute_mst_dsc_configs_for_state(): Uninitialized variables
@ 2022-11-18 16:50 ` coverity-bot
  0 siblings, 0 replies; 3+ messages in thread
From: coverity-bot @ 2022-11-18 16:50 UTC (permalink / raw)
  To: Lyude Paul
  Cc: David Airlie, Fangzhi Zuo, Harry Wentland, Christian König,
	Wayne Lin, stable, #v5.6+, linux-kernel, Thomas Zimmermann,
	Daniel Vetter, Rodrigo Siqueira, Roman Li, amd-gfx,
	Daniel Wheeler, Leo Li, Alex Deucher, Pan, Xinhui, hersen wu,
	Nicholas Kazlauskas, dri-devel, Aurabindo Pillai, Hamza Mahfooz,
	Alex Hung, Gustavo A. R. Silva, linux-next, linux-hardening

Hello!

This is an experimental semi-automated report about issues detected by
Coverity from a scan of next-20221118 as part of the linux-next scan project:
https://scan.coverity.com/projects/linux-next-weekly-scan

You're getting this email because you were associated with the identified
lines of code (noted below) that were touched by commits:

  Thu Nov 17 00:18:25 2022 -0500
    7cce4cd628be ("drm/amdgpu/mst: Stop ignoring error codes and deadlocking")

Coverity reported the following:

*** CID 1527373:  Uninitialized variables  (UNINIT)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c:1227 in pre_compute_mst_dsc_configs_for_state()
1221     		for (j = 0; j < dc_state->stream_count; j++) {
1222     			if (dc_state->streams[j]->link == stream->link)
1223     				computed_streams[j] = true;
1224     		}
1225     	}
1226
vvv     CID 1527373:  Uninitialized variables  (UNINIT)
vvv     Using uninitialized value "ret".
1227     	return ret;
1228     }
1229
1230     static int find_crtc_index_in_state_by_stream(struct drm_atomic_state *state,
1231     					      struct dc_stream_state *stream)
1232     {

If this is a false positive, please let us know so we can mark it as
such, or teach the Coverity rules to be smarter. If not, please make
sure fixes get into linux-next. :) For patches fixing this, please
include these lines (but double-check the "Fixes" first):

Reported-by: coverity-bot <keescook+coverity-bot@chromium.org>
Addresses-Coverity-ID: 1527373 ("Uninitialized variables")
Fixes: 7cce4cd628be ("drm/amdgpu/mst: Stop ignoring error codes and deadlocking")

If dc_state->stream_count is 0, "ret" is undefined. Perhaps initialize
it as -EINVAL?

Thanks for your attention!

-- 
Coverity-bot

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Coverity: pre_compute_mst_dsc_configs_for_state(): Uninitialized variables
@ 2022-11-18 16:50 ` coverity-bot
  0 siblings, 0 replies; 3+ messages in thread
From: coverity-bot @ 2022-11-18 16:50 UTC (permalink / raw)
  To: Lyude Paul
  Cc: Gustavo A. R. Silva, dri-devel, Roman Li, Hamza Mahfooz,
	Rodrigo Siqueira, amd-gfx, Alex Hung, Fangzhi Zuo,
	Aurabindo Pillai, Thomas Zimmermann, Leo Li, #v5.6+,
	Daniel Wheeler, hersen wu, Pan, Xinhui, linux-kernel, stable,
	Christian König, linux-next, Wayne Lin, Alex Deucher,
	Nicholas Kazlauskas, linux-hardening

Hello!

This is an experimental semi-automated report about issues detected by
Coverity from a scan of next-20221118 as part of the linux-next scan project:
https://scan.coverity.com/projects/linux-next-weekly-scan

You're getting this email because you were associated with the identified
lines of code (noted below) that were touched by commits:

  Thu Nov 17 00:18:25 2022 -0500
    7cce4cd628be ("drm/amdgpu/mst: Stop ignoring error codes and deadlocking")

Coverity reported the following:

*** CID 1527373:  Uninitialized variables  (UNINIT)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c:1227 in pre_compute_mst_dsc_configs_for_state()
1221     		for (j = 0; j < dc_state->stream_count; j++) {
1222     			if (dc_state->streams[j]->link == stream->link)
1223     				computed_streams[j] = true;
1224     		}
1225     	}
1226
vvv     CID 1527373:  Uninitialized variables  (UNINIT)
vvv     Using uninitialized value "ret".
1227     	return ret;
1228     }
1229
1230     static int find_crtc_index_in_state_by_stream(struct drm_atomic_state *state,
1231     					      struct dc_stream_state *stream)
1232     {

If this is a false positive, please let us know so we can mark it as
such, or teach the Coverity rules to be smarter. If not, please make
sure fixes get into linux-next. :) For patches fixing this, please
include these lines (but double-check the "Fixes" first):

Reported-by: coverity-bot <keescook+coverity-bot@chromium.org>
Addresses-Coverity-ID: 1527373 ("Uninitialized variables")
Fixes: 7cce4cd628be ("drm/amdgpu/mst: Stop ignoring error codes and deadlocking")

If dc_state->stream_count is 0, "ret" is undefined. Perhaps initialize
it as -EINVAL?

Thanks for your attention!

-- 
Coverity-bot

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-11-18 17:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-18 16:50 Coverity: pre_compute_mst_dsc_configs_for_state(): Uninitialized variables coverity-bot
2022-11-18 16:50 ` coverity-bot
2022-11-18 16:50 ` coverity-bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.