[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241226193637.241049-13-niharchaithanya@gmail.com>
Date: Fri, 27 Dec 2024 01:06:36 +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 12/15] staging: gpib: lpvo_usb: 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/lpvo_usb_gpib/lpvo_usb_gpib.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c b/drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c
index 796c3a5be545..d8af811c75ca 100644
--- a/drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c
+++ b/drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c
@@ -1181,7 +1181,9 @@ static int usb_gpib_init_module(struct usb_interface *interface)
return rv;
if (!assigned_usb_minors) {
- gpib_register_driver(&usb_gpib_interface, THIS_MODULE);
+ rv = gpib_register_driver(&usb_gpib_interface, THIS_MODULE);
+ if (rv)
+ goto exit;
} else {
/* check if minor is already registered - maybe useless, but if
* it happens the code is inconsistent somewhere
--
2.34.1
Powered by blists - more mailing lists