diff options
| author | Damien Le Moal <[email protected]> | 2022-02-20 12:17:56 +0900 |
|---|---|---|
| committer | Martin K. Petersen <[email protected]> | 2022-02-22 21:31:19 -0500 |
| commit | f17c599a44fca3d04bd1bed3f452c104d9e48cab (patch) | |
| tree | 83814c9ea751d30a000e04978b84b10c555ad032 /tools/perf/scripts/python | |
| parent | 7f12845c8389855dbcc67baa068b6832dc4a396e (diff) | |
scsi: pm8001: Fix pm8001_tag_alloc() failures handling
In mpi_set_phy_profile_req() and in pm8001_set_phy_profile_single(), if
pm8001_tag_alloc() fails to allocate a new tag, a warning message is issued
but the uninitialized tag variable is still used to build a command. Avoid
this by returning early in case of tag allocation failure.
Also make sure to always return the error code returned by
pm8001_tag_alloc() when this function fails instead of an arbitrary value.
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: John Garry <[email protected]>
Reviewed-by: Jack Wang <[email protected]>
Signed-off-by: Damien Le Moal <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions