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. Add pr_err() statement indicating the fail and also the error value. Signed-off-by: Nihar Chaithanya <niharchaithanya@gmail.com> Link: https://lore.kernel.org/r/20241230185633.175690-9-niharchaithanya@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>pull/1134/merge
parent
10ca8c3b51
commit
908ff8d49e
|
|
@ -1341,7 +1341,12 @@ 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) {
|
||||
pr_err("gpib_bitbang: gpib_register_driver failed: error = %d\n", result);
|
||||
return result;
|
||||
}
|
||||
|
||||
dbg_printk(0, "module loaded with pin map \"%s\"%s\n",
|
||||
pin_map, (sn7516x_used) ? " and SN7516x driver support" : "");
|
||||
|
|
|
|||
Loading…
Reference in New Issue