[PATCH] bsr: fix build problem with bsr_class static cleanup

From: Greg Kroah-Hartman
Date: Mon Jun 26 2023 - 05:03:21 EST


In commit e55ce9fd3d8f ("bsr: make bsr_class a static const structure"),
the bsr_init function was converted to handle a static class structure,
but the conversion got a variable name wrong, which caused build errors
so fix that up.

Cc: Arnd Bergmann <arnd@xxxxxxxx>
Cc: Ivan Orlov <ivan.orlov0322@xxxxxxxxx>
Reported-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
Link: https://lore.kernel.org/r/20230626142537.755ec782@xxxxxxxxxxxxxxxx
Fixes: e55ce9fd3d8f ("bsr: make bsr_class a static const structure")
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
drivers/char/bsr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/char/bsr.c b/drivers/char/bsr.c
index 0654f0e6b320..12143854aeac 100644
--- a/drivers/char/bsr.c
+++ b/drivers/char/bsr.c
@@ -298,7 +298,7 @@ static int __init bsr_init(void)
goto out_err;

ret = class_register(&bsr_class);
- if (err)
+ if (ret)
goto out_err_1;

ret = alloc_chrdev_region(&bsr_dev, 0, BSR_MAX_DEVS, "bsr");
--
2.41.0