ufshci: initialize alloc_units before the dedicated-buffer scan

If every unit descriptor read failed in the LU-dedicated WriteBooster
scan, alloc_units was used uninitialized. Start it at zero so that case
is treated as a zero-sized buffer and WriteBooster is disabled.

Sponsored by:           Samsung Electronics
Reviewed by:		imp (mentor)
Differential Revision:	https://reviews.freebsd.org/D58663
This commit is contained in:
Jaeyoon Choi committed 2026-08-10 02:28:51 +00:00
1 parent c71705a083
commit 456ab423dd
1 file changed
+1 -1
+1 -1
View File
@@ -745,7 +745,7 @@ ufshci_dev_config_write_booster(struct ufshci_controller *ctrlr)
{
struct ufshci_device *dev = &ctrlr->ufs_dev;
uint32_t extended_ufs_feature_support;
uint32_t alloc_units;
uint32_t alloc_units = 0;
struct ufshci_unit_descriptor unit_desc;
uint8_t lun;
bool is_life_time_left;