Skip to content
Snippets Groups Projects
Commit bc7016a6 authored by Yuchen Yang's avatar Yuchen Yang Committed by Greg Kroah-Hartman
Browse files

scsi: 3w-xxxx: Add error handling for initialization failure in tw_probe()


[ Upstream commit 2e2fe5ac ]

Smatch complains that:

tw_probe() warn: missing error code 'retval'

This patch adds error checking to tw_probe() to handle initialization
failure. If tw_reset_sequence() function returns a non-zero value, the
function will return -EINVAL to indicate initialization failure.

Fixes: 1da177e4 ("Linux-2.6.12-rc2")
Signed-off-by: default avatarYuchen Yang <u202114568@hust.edu.cn>
Link: https://lore.kernel.org/r/20230505141259.7730-1-u202114568@hust.edu.cn


Reviewed-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent d51d2eea
2 merge requests!726Document changes and release 6.3.13pureos1~byz1 into byzantium,!724update to v6.3.13
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment