aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Elfring <[email protected]>2023-12-27 15:30:06 +0100
committerMiquel Raynal <[email protected]>2024-02-05 14:22:39 +0100
commit0d9a4164ba4929bbc231eef438d4cba1caee9d25 (patch)
tree8f2ab6c7c4446b687a69820a2eda6e9ca47e3e8b
parent086cd7a6c50bb3206fc08e0a850daaabef03e810 (diff)
mtd: ssfdc: Improve a size determination in ssfdcr_add_mtd()
Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring <[email protected]> Signed-off-by: Miquel Raynal <[email protected]> Link: https://lore.kernel.org/linux-mtd/[email protected]
-rw-r--r--drivers/mtd/ssfdc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/ssfdc.c b/drivers/mtd/ssfdc.c
index e6de25087647..46c01fa2ec46 100644
--- a/drivers/mtd/ssfdc.c
+++ b/drivers/mtd/ssfdc.c
@@ -295,7 +295,7 @@ static void ssfdcr_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd)
if (cis_sector == -1)
return;
- ssfdc = kzalloc(sizeof(struct ssfdcr_record), GFP_KERNEL);
+ ssfdc = kzalloc(sizeof(*ssfdc), GFP_KERNEL);
if (!ssfdc)
return;