From: Colin Ian King <colin.k...@canonical.com>

Currently ipmi_set_my_LUN returns 0 instead of -EINVAL if the channel
is out of range.  Fix this by returning the error return rv instead of 0.

Detected by Clang ("variable 'rv' set but not used")

Fixes: 048f7c3e352e ("ipmi: Properly release srcu locks on error conditions")
Signed-off-by: Colin Ian King <colin.k...@canonical.com>
---
 drivers/char/ipmi/ipmi_msghandler.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/char/ipmi/ipmi_msghandler.c 
b/drivers/char/ipmi/ipmi_msghandler.c
index 04f64c55e275..a74ce885b541 100644
--- a/drivers/char/ipmi/ipmi_msghandler.c
+++ b/drivers/char/ipmi/ipmi_msghandler.c
@@ -1344,7 +1344,7 @@ int ipmi_set_my_LUN(struct ipmi_user *user,
                user->intf->addrinfo[channel].lun = LUN & 0x3;
        release_ipmi_user(user, index);
 
-       return 0;
+       return rv;
 }
 EXPORT_SYMBOL(ipmi_set_my_LUN);
 
-- 
2.17.1


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Openipmi-developer mailing list
Openipmi-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openipmi-developer

Reply via email to