[PATCH v3 12/13] drm/xe/pmu: Fail probe if xe_pmu_register() fails
Upadhyay, Tejas
tejas.upadhyay at intel.com
Mon Feb 10 11:17:18 UTC 2025
> -----Original Message-----
> From: Intel-xe <intel-xe-bounces at lists.freedesktop.org> On Behalf Of Lucas
> De Marchi
> Sent: Saturday, February 8, 2025 3:50 AM
> To: intel-xe at lists.freedesktop.org
> Cc: Vivi, Rodrigo <rodrigo.vivi at intel.com>; Dugast, Francois
> <francois.dugast at intel.com>; Auld, Matthew <matthew.auld at intel.com>;
> Ceraolo Spurio, Daniele <daniele.ceraolospurio at intel.com>; De Marchi, Lucas
> <lucas.demarchi at intel.com>; Tauro, Riana <riana.tauro at intel.com>;
> Belgaumkar, Vinay <vinay.belgaumkar at intel.com>
> Subject: [PATCH v3 12/13] 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 <riana.tauro at intel.com>
> Cc: Vinay Belgaumkar <vinay.belgaumkar at intel.com>
> Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
> ---
> drivers/gpu/drm/xe/xe_device.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
> index 6f90d74330524..002e066f5f288 100644
> --- a/drivers/gpu/drm/xe/xe_device.c
> +++ b/drivers/gpu/drm/xe/xe_device.c
> @@ -883,7 +883,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;
This looks good, since now we are treating all errors as probe failure,
LGTM,
Reviewed-by: Tejas Upadhyay <tejas.upadhyay at intel.com>
Tejas
>
> xe_debugfs_register(xe);
>
> --
> 2.48.1
More information about the Intel-xe
mailing list