]> Gentwo Git Trees - linux/.git/commit
staging: gpib: agilent_82350b: Handle gpib_register_driver() errors
authorNihar Chaithanya <niharchaithanya@gmail.com>
Mon, 30 Dec 2024 18:56:22 +0000 (00:26 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 7 Jan 2025 14:38:55 +0000 (15:38 +0100)
commitf546fa464031423be3dbebc966ad4703f985c9d5
tree9e1aaa8e8e1c4d9eab184b0ffb645c4ebed5a08a
parente999bd2a897e7d70fa1fca6b80873529532322fe
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>
drivers/staging/gpib/agilent_82350b/agilent_82350b.c