* [PATCH] platform/x86: x86-android-tablets: Remove the use of dev_err_probe()
@ 2025-08-20 8:51 Xichao Zhao
2025-08-22 13:45 ` Hans de Goede
2025-08-28 12:07 ` Ilpo Järvinen
0 siblings, 2 replies; 3+ messages in thread
From: Xichao Zhao @ 2025-08-20 8:51 UTC (permalink / raw)
To: hansg, ilpo.jarvinen; +Cc: platform-driver-x86, linux-kernel, Xichao Zhao
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] platform/x86: x86-android-tablets: Remove the use of dev_err_probe()
2025-08-20 8:51 [PATCH] platform/x86: x86-android-tablets: Remove the use of dev_err_probe() Xichao Zhao
@ 2025-08-22 13:45 ` Hans de Goede
2025-08-28 12:07 ` Ilpo Järvinen
1 sibling, 0 replies; 3+ messages in thread
From: Hans de Goede @ 2025-08-22 13:45 UTC (permalink / raw)
To: Xichao Zhao, ilpo.jarvinen; +Cc: platform-driver-x86, linux-kernel
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;
> }
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] platform/x86: x86-android-tablets: Remove the use of dev_err_probe()
2025-08-20 8:51 [PATCH] platform/x86: x86-android-tablets: Remove the use of dev_err_probe() Xichao Zhao
2025-08-22 13:45 ` Hans de Goede
@ 2025-08-28 12:07 ` Ilpo Järvinen
1 sibling, 0 replies; 3+ messages in thread
From: Ilpo Järvinen @ 2025-08-28 12:07 UTC (permalink / raw)
To: hansg, Xichao Zhao; +Cc: platform-driver-x86, linux-kernel
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-08-28 12:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-20 8:51 [PATCH] platform/x86: x86-android-tablets: Remove the use of dev_err_probe() Xichao Zhao
2025-08-22 13:45 ` Hans de Goede
2025-08-28 12:07 ` Ilpo Järvinen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).