diff options
author | Shuah Khan <skhan@linuxfoundation.org> | 2022-07-01 10:53:52 -0600 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-07-02 16:20:56 +0200 |
commit | 2cd37c2e72449a7add6da1183d20a6247d6db111 (patch) | |
tree | 00e28f259651de2fadd147fb54c4d6fd53a5b16f /drivers/platform/surface/aggregator/ssh_request_layer.h | |
parent | 3776c78559853fd151be7c41e369fd076fb679d5 (diff) |
misc: rtsx_usb: set return value in rsp_buf alloc err path
Set return value in rsp_buf alloc error path before going to
error handling.
drivers/misc/cardreader/rtsx_usb.c:639:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if (!ucr->rsp_buf)
^~~~~~~~~~~~~
drivers/misc/cardreader/rtsx_usb.c:678:9: note: uninitialized use occurs here
return ret;
^~~
drivers/misc/cardreader/rtsx_usb.c:639:2: note: remove the 'if' if its condition is always false
if (!ucr->rsp_buf)
^~~~~~~~~~~~~~~~~~
drivers/misc/cardreader/rtsx_usb.c:622:9: note: initialize the variable 'ret' to silence this warning
int ret;
^
= 0
Fixes: 3776c7855985 ("misc: rtsx_usb: use separate command and response buffers")
Reported-by: kernel test robot <lkp@intel.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Link: https://lore.kernel.org/r/20220701165352.15687-1-skhan@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/platform/surface/aggregator/ssh_request_layer.h')
0 files changed, 0 insertions, 0 deletions