mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [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	[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

all inboxes | Powered by JetHome®