The list iterator is always non-NULL so the check 'if (!rgn)' is always
false and the dev_err() is never called. Move the check outside the loop
and determine if 'victim_rgn' is NULL, to fix this bug.
Link: https://lore.kernel.org/r/20220320150733.21824-1-xiam0nd.tong@gmail.com
Fixes:
|
||
|---|---|---|
| .. | ||
| cdns-pltfrm.c | ||
| Kconfig | ||
| Makefile | ||
| tc-dwc-g210-pci.c | ||
| tc-dwc-g210-pltfrm.c | ||
| tc-dwc-g210.c | ||
| tc-dwc-g210.h | ||
| ti-j721e-ufs.c | ||
| ufs_bsg.c | ||
| ufs_bsg.h | ||
| ufs_quirks.h | ||
| ufs-debugfs.c | ||
| ufs-debugfs.h | ||
| ufs-exynos.c | ||
| ufs-exynos.h | ||
| ufs-fault-injection.c | ||
| ufs-fault-injection.h | ||
| ufs-hisi.c | ||
| ufs-hisi.h | ||
| ufs-hwmon.c | ||
| ufs-mediatek-trace.h | ||
| ufs-mediatek.c | ||
| ufs-mediatek.h | ||
| ufs-qcom-ice.c | ||
| ufs-qcom.c | ||
| ufs-qcom.h | ||
| ufs-sysfs.c | ||
| ufs-sysfs.h | ||
| ufs.h | ||
| ufshcd-crypto.c | ||
| ufshcd-crypto.h | ||
| ufshcd-dwc.c | ||
| ufshcd-dwc.h | ||
| ufshcd-pci.c | ||
| ufshcd-pltfrm.c | ||
| ufshcd-pltfrm.h | ||
| ufshcd.c | ||
| ufshcd.h | ||
| ufshci-dwc.h | ||
| ufshci.h | ||
| ufshpb.c | ||
| ufshpb.h | ||
| unipro.h | ||