[PATCH] scsi: Have scsi_init_dev_desc_priv() use memset
Tom Rini
trini at konsulko.com
Fri Nov 10 17:21:24 CET 2023
On Wed, Nov 08, 2023 at 02:28:11PM -0500, Tom Rini wrote:
> When we do not have CONFIG_BOUNCE_BUFFER enabled, inside of
> scsi_init_dev_desc_priv we never set the 'bb' field to false, we only
> initialize it to true when CONFIG_BOUNCE_BUFFER is set. Given that we
> have a number of other fields here we had been explicitly setting to
> zero, change to first calling memset to clear the struct and then
> initialize only the fields that need non-zero default values.
>
> Addresses-Coverity-ID: 467407 ("Uninitialized variables (UNINIT)")
> Fixes: 81bd22e935dc ("rockchip: block: blk-uclass: add bounce buffer flag to blk_desc")
> Signed-off-by: Tom Rini <trini at konsulko.com>
> Reviewed-by: Simon Glass <sjg at chromium.org>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20231110/3dee684f/attachment.sig>
More information about the U-Boot
mailing list