git: 456ab423dddc - main - ufshci: initialize alloc_units before the dedicated-buffer scan

Jaeyoon Choi <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.src,gmane.os.freebsd.current.scm
Message-ID <[email protected]>
The branch main has been updated by jaeyoon:

URL: https://cgit.FreeBSD.org/src/commit/?id=456ab423dddc0ce07787b21fcb79426abc7b436e

commit 456ab423dddc0ce07787b21fcb79426abc7b436e
Author:     Jaeyoon Choi <[email protected]>
AuthorDate: 2026-08-10 01:45:49 +0000
Commit:     Jaeyoon Choi <[email protected]>
CommitDate: 2026-08-10 02:28:51 +0000

    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
---
 sys/dev/ufshci/ufshci_dev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/dev/ufshci/ufshci_dev.c b/sys/dev/ufshci/ufshci_dev.c
index 7113834db13a..db7a8c564a29 100644
--- a/sys/dev/ufshci/ufshci_dev.c
+++ b/sys/dev/ufshci/ufshci_dev.c
@@ -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;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.