diff options
| author | Adrian Hunter <[email protected]> | 2025-10-24 08:59:18 +0000 |
|---|---|---|
| committer | Martin K. Petersen <[email protected]> | 2025-10-30 03:20:19 +0000 |
| commit | a2b32bc1d9e359a9f90d0de6af16699facb10935 (patch) | |
| tree | f8676e5fb6438a828c4b5e30c209aeeb77a9dfe0 /tools/lib/traceevent/plugins/plugin_function.c | |
| parent | scsi: ufs: ufs-pci: Set UFSHCD_QUIRK_PERFORM_LINK_STARTUP_ONCE for Intel ADL (diff) | |
| download | kernel-a2b32bc1d9e359a9f90d0de6af16699facb10935.tar.gz kernel-a2b32bc1d9e359a9f90d0de6af16699facb10935.zip | |
scsi: ufs: core: Fix invalid probe error return value
After DME Link Startup, the error return value is set to the MIPI UniPro
GenericErrorCode which can be 0 (SUCCESS) or 1 (FAILURE). Upon failure
during driver probe, the error code 1 is propagated back to the driver
probe function which must return a negative value to indicate an error,
but 1 is not negative, so the probe is considered to be successful even
though it failed. Subsequently, removing the driver results in an oops
because it is not in a valid state.
This happens because none of the callers of ufshcd_init() expect a
non-negative error code.
Fix the return value and documentation to match actual usage.
Fixes: 69f5eb78d4b0 ("scsi: ufs: core: Move the ufshcd_device_init(hba, true) call")
Cc: [email protected]
Signed-off-by: Adrian Hunter <[email protected]>
Reviewed-by: Bart Van Assche <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'tools/lib/traceevent/plugins/plugin_function.c')
0 files changed, 0 insertions, 0 deletions
