Skip to content

Commit b6e1b70

Browse files
lucasdemarchirodrigovivi
authored andcommitted
drm/xe: Remove uninitialized variable from warning
"err" is not initialized when failing to create and add the freq0 sysfs file. Remove it from the message. This fixes the following warning with clang: ../drivers/gpu/drm/xe/xe_gt_freq.c:202:30: error: variable 'err' is uninitialized when used here [-Werror,-Wuninitialized] kobject_name(gt->sysfs), err); ^~~ Fixes: bef52b5 ("drm/xe: Create a xe_gt_freq component for raw management and sysfs") Reviewed-by: Michał Winiarski <michal.winiarski@intel.com> Link: https://lore.kernel.org/r/20231220161923.3740489-1-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
1 parent de991b9 commit b6e1b70

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpu/drm/xe/xe_gt_freq.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,8 @@ void xe_gt_freq_init(struct xe_gt *gt)
198198

199199
gt->freq = kobject_create_and_add("freq0", gt->sysfs);
200200
if (!gt->freq) {
201-
drm_warn(&xe->drm, "failed to add freq0 directory to %s, err: %d\n",
202-
kobject_name(gt->sysfs), err);
201+
drm_warn(&xe->drm, "failed to add freq0 directory to %s\n",
202+
kobject_name(gt->sysfs));
203203
return;
204204
}
205205

0 commit comments

Comments
 (0)