Skip to content

Commit 0cdfe5b

Browse files
mikkorapeli-linarostorulf
authored andcommitted
mmc: core: Initialize mmc_blk_ioc_data
Commit 4d0c8d0 ("mmc: core: Use mrq.sbc in close-ended ffu") adds flags uint to struct mmc_blk_ioc_data, but it does not get initialized for RPMB ioctls which now fails. Let's fix this by always initializing the struct and flags to zero. Fixes: 4d0c8d0 ("mmc: core: Use mrq.sbc in close-ended ffu") Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218587 Link: https://lore.kernel.org/all/[email protected]/ Cc: [email protected] Signed-off-by: Mikko Rapeli <[email protected]> Reviewed-by: Avri Altman <[email protected]> Acked-by: Adrian Hunter <[email protected]> Tested-by: Francesco Dolcini <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
1 parent 4cece76 commit 0cdfe5b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/mmc/core/block.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ static struct mmc_blk_ioc_data *mmc_blk_ioctl_copy_from_user(
413413
struct mmc_blk_ioc_data *idata;
414414
int err;
415415

416-
idata = kmalloc(sizeof(*idata), GFP_KERNEL);
416+
idata = kzalloc(sizeof(*idata), GFP_KERNEL);
417417
if (!idata) {
418418
err = -ENOMEM;
419419
goto out;

0 commit comments

Comments
 (0)