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:
|
||
|---|---|---|
| .. | ||
| Kconfig | ||
| Makefile | ||
| ufs-debugfs.c | ||
| ufs-debugfs.h | ||
| ufs-fault-injection.c | ||
| ufs-fault-injection.h | ||
| ufs-hwmon.c | ||
| ufs-mcq.c | ||
| ufs-sysfs.c | ||
| ufs-sysfs.h | ||
| ufs_bsg.c | ||
| ufs_bsg.h | ||
| ufs_trace.h | ||
| ufs_trace_types.h | ||
| ufshcd-crypto.c | ||
| ufshcd-crypto.h | ||
| ufshcd-priv.h | ||
| ufshcd.c | ||