staging: gpib: agilent_82350b: Handle gpib_register_driver() errors
The function gpib_register_driver() can fail which can result in
semi-registered module.
In case gpib_register_driver() fails unregister the previous
gpib and pci registering functions, return the error value.
Add pr_err() when registering driver fails also indicate the error
value.
Signed-off-by: Nihar Chaithanya <niharchaithanya@gmail.com>
Link: https://lore.kernel.org/r/20241230185633.175690-3-niharchaithanya@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>