]> git.ipfire.org Git - thirdparty/linux.git/commit
staging: gpib: Modify gpib_register_driver() to return error if it fails
authorNihar Chaithanya <niharchaithanya@gmail.com>
Mon, 30 Dec 2024 18:56:21 +0000 (00:26 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 7 Jan 2025 14:38:54 +0000 (15:38 +0100)
commite999bd2a897e7d70fa1fca6b80873529532322fe
tree6f5f5cf175edea3c44946c5565fe6ea423048e20
parent33bd6465275a11d4dbeceb9fe1b439d54e14fafe
staging: gpib: Modify gpib_register_driver() to return error if it fails

The function gpib_register_driver() can fail if kmalloc() fails,
but it doesn't return any error if that happens.

Modify the function to return error i.e int. Return the appropriate
error code if it fails. Remove the pr_info() statement.

Signed-off-by: Nihar Chaithanya <niharchaithanya@gmail.com>
Link: https://lore.kernel.org/r/20241230185633.175690-2-niharchaithanya@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/gpib/common/gpib_os.c
drivers/staging/gpib/include/gpibP.h