scsi: ufs: Fix unexpected values get from ufshcd_read_desc_param()
Since WB feature has been added, WB related sysfs entries can be accessed
even when an UFS device does not support WB feature. In that case, the
descriptors which are not supported by the UFS device may be wrongly
reported when they are accessed from their corrsponding sysfs entries.
Fix it by adding a sanity check of parameter offset against the actual
decriptor length.
Change-Id: I8a82abcb9ab881318634ae2f490b5276088d03f3
Signed-off-by:
Can Guo <cang@codeaurora.org>
Loading
Please register or sign in to comment