From: Lucas De Marchi Date: Thu, 13 Feb 2025 19:29:08 +0000 (-0800) Subject: drm/xe/pmu: Fail probe if xe_pmu_register() fails X-Git-Tag: v6.15-rc1~120^2~15^2~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6b5506158f902b3d427f76b0c243d025de40b333;p=thirdparty%2Fkernel%2Flinux.git drm/xe/pmu: Fail probe if xe_pmu_register() fails Now that previous callers in xe_device_probe() are handling the errors, that can be done for xe_pmu_register() as well. Cc: Riana Tauro Cc: Vinay Belgaumkar Reviewed-by: Tejas Upadhyay Reviewed-by: Himal Prasad Ghimiray Link: https://patchwork.freedesktop.org/patch/msgid/20250213192909.996148-12-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi --- diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c index 89a85f193f3af..6718b7c2d1ea1 100644 --- a/drivers/gpu/drm/xe/xe_device.c +++ b/drivers/gpu/drm/xe/xe_device.c @@ -889,7 +889,9 @@ int xe_device_probe(struct xe_device *xe) if (err) goto err_unregister_display; - xe_pmu_register(&xe->pmu); + err = xe_pmu_register(&xe->pmu); + if (err) + goto err_unregister_display; xe_debugfs_register(xe);