drivers/dibs/dibs_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
There is a typo in this code. It should check "dibs_class" instead of
"&dibs_class". Remove the &.
Fixes: 804737349813 ("dibs: Create class dibs")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
drivers/dibs/dibs_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/dibs/dibs_main.c b/drivers/dibs/dibs_main.c
index 5425238d5a42..0374f8350ff7 100644
--- a/drivers/dibs/dibs_main.c
+++ b/drivers/dibs/dibs_main.c
@@ -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)
--
2.51.0
On 24.09.25 16:21, Dan Carpenter 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")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
> drivers/dibs/dibs_main.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/dibs/dibs_main.c b/drivers/dibs/dibs_main.c
> index 5425238d5a42..0374f8350ff7 100644
> --- a/drivers/dibs/dibs_main.c
> +++ b/drivers/dibs/dibs_main.c
> @@ -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.
Reviewed-by: Alexandra Winter <wintera@linux.ibm.com>
© 2016 - 2025 Red Hat, Inc.