]> Gentwo Git Trees - linux/.git/commit
staging: gpib: hp_82341: Handle gpib_register_driver() errors
authorNihar Chaithanya <niharchaithanya@gmail.com>
Mon, 30 Dec 2024 18:56:30 +0000 (00:26 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 7 Jan 2025 14:38:55 +0000 (15:38 +0100)
commit44aaeb2c0843ea37f6235c173d2e8f8df3be1704
tree5850cb0a7a9520a988fa302eda60bfe48db52d6a
parent4e12a0928978451f92f6c10f71ef251a082acb3f
staging: gpib: hp_82341: Handle gpib_register_driver() errors

The function gpib_register_driver() can fail, resulting in a
semi-registered module and does not return an error value if it
fails.

Return the error value if the first gpib_register_driver() fails
and if the second gpib_register_driver() fails unregister the first
gpib_register_driver() and return the error value. Add pr_err()
statements indicating the fail and the error value.

Signed-off-by: Nihar Chaithanya <niharchaithanya@gmail.com>
Link: https://lore.kernel.org/r/20241230185633.175690-11-niharchaithanya@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/gpib/hp_82341/hp_82341.c