Skip to contentSkip to conversation

dibs: Check correct variable in dibs_init()

PATCH Applied Dan Carpenter 3 participants 3 messages Sep 24, 2025 – Sep 26, 2025

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dibs: Check correct variable in dibs_init()

There is a typo in this code. It should check "dibs_class" instead of "&dibs_class". Remove the &.

Fixes 804737349813 ("dibs: Create class dibs")
---
 drivers/dibs/dibs_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/dibs/dibs_main.c +2 -2
index 5425238d5a42..0374f8350ff7 100644
@@ -258,8 +258,8 @@ static int __init dibs_init(void)
 	max_client = 0;
 
 	dibs_class = class_create("dibs");
-	if (IS_ERR(&dibs_class))
-		return PTR_ERR(&dibs_class);
+	if (IS_ERR(dibs_class))
+		return PTR_ERR(dibs_class);
 
 	rc = dibs_loopback_init();
 	if (rc)
Signature · 1 line
2.51.0
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 14 lines · Dan Carpenter

There is a typo in this code. It should check "dibs_class" instead of "&dibs_class". Remove the &.

Fixes 804737349813 ("dibs: Create class dibs")
---
 drivers/dibs/dibs_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/dibs/dibs_main.c +0 -0
index 5425238d5a42..0374f8350ff7 100644

drivers/dibs/dibs_main.c static int __init dibs_init(void) · line 265

Quoted 10 lines
drivers/dibs/dibs_main.c +2 -2
@@ -258,8 +258,8 @@ static int __init dibs_init(void)
 	max_client = 0;
 
 	dibs_class = class_create("dibs");
-	if (IS_ERR(&dibs_class))
-		return PTR_ERR(&dibs_class);
+	if (IS_ERR(dibs_class))
+		return PTR_ERR(dibs_class);
 
 	rc = dibs_loopback_init();
 	if (rc)

oops, this has been wrong since the first RFC in february. Great catch, thank you Dan.

#2 lore raw
In reply to Dan Carpenter
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 8 lines · On Wed, 24 Sep 2025 17:21:17 +0300 you wrote:

There is a typo in this code. It should check "dibs_class" instead of "&dibs_class". Remove the &.

Fixes 804737349813 ("dibs: Create class dibs")
---
 drivers/dibs/dibs_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Here is the summary with links:
- [net-next] dibs: Check correct variable in dibs_init()

    https://git.kernel.org/netdev/net-next/c/231889d9b626

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html