From: Riyan Dhiman Date: Sun, 1 Sep 2024 17:33:09 +0000 (+0530) Subject: mmc: core: Calculate size from pointer X-Git-Tag: v6.12-rc1~158^2~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d2253bfa830e907eddad13d9de99d7b6df8585a1;p=thirdparty%2Fkernel%2Flinux.git mmc: core: Calculate size from pointer Calculate the size from pointer instead of struct to adhere to linux kernel coding style. Issue reported by checkpatch. This commit has no functional changes. Signed-off-by: Riyan Dhiman Link: https://lore.kernel.org/r/20240901173309.7124-1-riyandhiman14@gmail.com Signed-off-by: Ulf Hansson --- diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c index cc7318089cf2d..2ff053f2be112 100644 --- a/drivers/mmc/core/block.c +++ b/drivers/mmc/core/block.c @@ -2530,7 +2530,7 @@ static struct mmc_blk_data *mmc_blk_alloc_req(struct mmc_card *card, return ERR_PTR(devidx); } - md = kzalloc(sizeof(struct mmc_blk_data), GFP_KERNEL); + md = kzalloc(sizeof(*md), GFP_KERNEL); if (!md) { ret = -ENOMEM; goto out;