[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241226193637.241049-9-niharchaithanya@gmail.com>
Date: Fri, 27 Dec 2024 01:06:32 +0530
From: Nihar Chaithanya <niharchaithanya@...il.com>
To: dpenkler@...il.com,
gregkh@...uxfoundation.org
Cc: dan.carpenter@...aro.org,
skhan@...uxfoundation.org,
linux-staging@...ts.linux.dev,
linux-kernel@...r.kernel.org,
Nihar Chaithanya <niharchaithanya@...il.com>
Subject: [PATCH v4 08/15] staging: gpib: gpio: Return error value from gpib_register_driver()
The function gpib_register_driver() can fail and does not return an
error value if it fails.
Return the error value if gpib_register_driver() fails.
Signed-off-by: Nihar Chaithanya <niharchaithanya@...il.com>
---
drivers/staging/gpib/gpio/gpib_bitbang.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/gpib/gpio/gpib_bitbang.c b/drivers/staging/gpib/gpio/gpib_bitbang.c
index a2d562cbd65b..c88d85b7dc71 100644
--- a/drivers/staging/gpib/gpio/gpib_bitbang.c
+++ b/drivers/staging/gpib/gpio/gpib_bitbang.c
@@ -1341,7 +1341,10 @@ return_to_local : bb_return_to_local,
static int __init bb_init_module(void)
{
- gpib_register_driver(&bb_interface, THIS_MODULE);
+ int result = gpib_register_driver(&bb_interface, THIS_MODULE);
+
+ if (result)
+ return result;
dbg_printk(0, "module loaded with pin map \"%s\"%s\n",
pin_map, (sn7516x_used) ? " and SN7516x driver support" : "");
--
2.34.1
Powered by blists - more mailing lists