Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mtd: rawnand: qcom: Early structure initialization
Instead of allocating a structure on the stack with random data and then expect the callee to perform the initialization (which is, in general, error prone), prefer zeroing the structure explicitly at allocation and provide the already zeroed area, so no explicit memset operation is needed. It is probably safer to do so, so we limit the timeframe when dirty data could actually be accessed by mistake. Signed-off-by: Miquel Raynal <[email protected]> Acked-by: Manivannan Sadhasivam <[email protected]> Reviewed-by: Tudor Ambarus <[email protected]> Link: https://lore.kernel.org/linux-mtd/[email protected]
- Loading branch information