This is a note to let you know that I've just added the patch titled platform/surface: platform_profile: Propagate error if profile registration fails to the 6.1-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: platform-surface-platform_profile-propagate-error-if-profile-registration-fails.patch and it can be found in the queue-6.1 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From fe0e04cf66a12ffe6d1b43725ddaabd5599d024f Mon Sep 17 00:00:00 2001 From: Armin Wolf <W_Armin@xxxxxx> Date: Sun, 15 Oct 2023 01:54:49 +0200 Subject: platform/surface: platform_profile: Propagate error if profile registration fails From: Armin Wolf <W_Armin@xxxxxx> commit fe0e04cf66a12ffe6d1b43725ddaabd5599d024f upstream. If platform_profile_register() fails, the driver does not propagate the error, but instead probes successfully. This means when the driver unbinds, the a warning might be issued by platform_profile_remove(). Fix this by propagating the error back to the caller of surface_platform_profile_probe(). Compile-tested only. Fixes: b78b4982d763 ("platform/surface: Add platform profile driver") Signed-off-by: Armin Wolf <W_Armin@xxxxxx> Reviewed-by: Maximilian Luz <luzmaximilian@xxxxxxxxx> Tested-by: Maximilian Luz <luzmaximilian@xxxxxxxxx> Link: https://lore.kernel.org/r/20231014235449.288702-1-W_Armin@xxxxxx Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/platform/surface/surface_platform_profile.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/drivers/platform/surface/surface_platform_profile.c +++ b/drivers/platform/surface/surface_platform_profile.c @@ -159,8 +159,7 @@ static int surface_platform_profile_prob set_bit(PLATFORM_PROFILE_BALANCED_PERFORMANCE, tpd->handler.choices); set_bit(PLATFORM_PROFILE_PERFORMANCE, tpd->handler.choices); - platform_profile_register(&tpd->handler); - return 0; + return platform_profile_register(&tpd->handler); } static void surface_platform_profile_remove(struct ssam_device *sdev) Patches currently in stable-queue which might be from W_Armin@xxxxxx are queue-6.1/platform-surface-platform_profile-propagate-error-if-profile-registration-fails.patch