[PATCH] platform/x86: x86-android-tablets: Remove the use of dev_err_probe()

Xichao Zhao posted 1 patch 1 month, 2 weeks ago
drivers/platform/x86/x86-android-tablets/core.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
[PATCH] platform/x86: x86-android-tablets: Remove the use of dev_err_probe()
Posted by Xichao Zhao 1 month, 2 weeks ago
The dev_err_probe() doesn't do anything when error is '-ENOMEM'.
Therefore, remove the useless call to dev_err_probe(), and just
return the value instead.

Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>
---
 drivers/platform/x86/x86-android-tablets/core.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/platform/x86/x86-android-tablets/core.c b/drivers/platform/x86/x86-android-tablets/core.c
index 2a9c47178505..db76ba3abd7b 100644
--- a/drivers/platform/x86/x86-android-tablets/core.c
+++ b/drivers/platform/x86/x86-android-tablets/core.c
@@ -265,8 +265,7 @@ static __init int x86_instantiate_spi_dev(const struct x86_dev_info *dev_info, i
 	spi_devs[idx] = spi_new_device(controller, &board_info);
 	put_device(&controller->dev);
 	if (!spi_devs[idx])
-		return dev_err_probe(&controller->dev, -ENOMEM,
-				     "creating SPI-device %d\n", idx);
+		return -ENOMEM;
 
 	return 0;
 }
-- 
2.34.1
Re: [PATCH] platform/x86: x86-android-tablets: Remove the use of dev_err_probe()
Posted by Ilpo Järvinen 1 month ago
On Wed, 20 Aug 2025 16:51:01 +0800, Xichao Zhao wrote:

> The dev_err_probe() doesn't do anything when error is '-ENOMEM'.
> Therefore, remove the useless call to dev_err_probe(), and just
> return the value instead.
> 
> 


Thank you for your contribution, it has been applied to my local
review-ilpo-next branch. Note it will show up in the public
platform-drivers-x86/review-ilpo-next branch only once I've pushed my
local branch there, which might take a while.

The list of commits applied:
[1/1] platform/x86: x86-android-tablets: Remove the use of dev_err_probe()
      commit: faec01b1a4998f3747f55e394409bdcb541af319

--
 i.
Re: [PATCH] platform/x86: x86-android-tablets: Remove the use of dev_err_probe()
Posted by Hans de Goede 1 month, 1 week ago
Hi,

On 20-Aug-25 10:51 AM, Xichao Zhao wrote:
> The dev_err_probe() doesn't do anything when error is '-ENOMEM'.
> Therefore, remove the useless call to dev_err_probe(), and just
> return the value instead.
> 
> Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>

Thanks, patch looks good to me:

Reviewed-by: Hans de Goede <hansg@kernel.org>

Regards,

Hans



> ---
>  drivers/platform/x86/x86-android-tablets/core.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/platform/x86/x86-android-tablets/core.c b/drivers/platform/x86/x86-android-tablets/core.c
> index 2a9c47178505..db76ba3abd7b 100644
> --- a/drivers/platform/x86/x86-android-tablets/core.c
> +++ b/drivers/platform/x86/x86-android-tablets/core.c
> @@ -265,8 +265,7 @@ static __init int x86_instantiate_spi_dev(const struct x86_dev_info *dev_info, i
>  	spi_devs[idx] = spi_new_device(controller, &board_info);
>  	put_device(&controller->dev);
>  	if (!spi_devs[idx])
> -		return dev_err_probe(&controller->dev, -ENOMEM,
> -				     "creating SPI-device %d\n", idx);
> +		return -ENOMEM;
>  
>  	return 0;
>  }