Skip to content

Commit 9b234d2

Browse files
aditya23788ickle
authored andcommitted
drm/i915/selftests: Fix uninitialized variable
Static code analysis tool identified struct lrc_timestamp data as being uninitialized and then data.ce[] is being checked for NULL/negative value in the error path. Initializing data variable fixes the issue. Cc: Matt Roper <[email protected]> Cc: Chris Wilson <[email protected]> Signed-off-by: Aditya Swarup <[email protected]> Reviewed-by: Chris Wilson <[email protected]> Signed-off-by: Chris Wilson <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 82126e5 commit 9b234d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/i915/gt/selftest_lrc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4723,9 +4723,9 @@ static int __lrc_timestamp(const struct lrc_timestamp *arg, bool preempt)
47234723

47244724
static int live_lrc_timestamp(void *arg)
47254725
{
4726+
struct lrc_timestamp data = {};
47264727
struct intel_gt *gt = arg;
47274728
enum intel_engine_id id;
4728-
struct lrc_timestamp data;
47294729
const u32 poison[] = {
47304730
0,
47314731
S32_MAX,

0 commit comments

Comments
 (0)