public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] driver core: Add log when devtmpfs create node failed
@ 2024-05-22 11:43 Xingui Yang
  2024-05-22 12:23 ` Greg KH
  2024-05-29  2:49 ` kernel test robot
  0 siblings, 2 replies; 8+ messages in thread
From: Xingui Yang @ 2024-05-22 11:43 UTC (permalink / raw)
  To: gregkh, rafael
  Cc: linux-scsi, linux-kernel, linuxarm, prime.zeng, liyihang9,
	kangfenglong

Currently, no exception information is output when devtmpfs create node
failed, so add log info for it.

Signed-off-by: Xingui Yang <yangxingui@huawei.com>
---
 drivers/base/core.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/base/core.c b/drivers/base/core.c
index 5f4e03336e68..32a41e0472b2 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -3691,7 +3691,10 @@ int device_add(struct device *dev)
 		if (error)
 			goto SysEntryError;
 
-		devtmpfs_create_node(dev);
+		error = devtmpfs_create_node(dev);
+		if (error)
+			pr_info("devtmpfs create node for %s failed: %d\n",
+				dev_name(dev), error);
 	}
 
 	/* Notify clients of device addition.  This call must come
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-05-29  2:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-22 11:43 [PATCH] driver core: Add log when devtmpfs create node failed Xingui Yang
2024-05-22 12:23 ` Greg KH
2024-05-23  1:50   ` yangxingui
2024-05-23  7:25     ` Greg KH
2024-05-23  9:23       ` yangxingui
2024-05-23  9:35         ` Greg KH
2024-05-23 11:01           ` yangxingui
2024-05-29  2:49 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox