Skip to content

Commit 0abcac4

Browse files
samasth-norwayConchuOD
authored andcommitted
firmware: microchip: fix wrong sizeof argument
response_msg is a pointer to an unsigned int (u32). So passing just response_msg to sizeof would not print the size of the variable. To get the size of response_msg we need to pass it as a pointer variable. Fixes: ec5b0f1 ("firmware: microchip: add PolarFire SoC Auto Update support") Signed-off-by: Samasth Norway Ananda <[email protected]> Signed-off-by: Conor Dooley <[email protected]>
1 parent 6613476 commit 0abcac4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/firmware/microchip/mpfs-auto-update.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ static int mpfs_auto_update_verify_image(struct fw_upload *fw_uploader)
167167
u32 *response_msg;
168168
int ret;
169169

170-
response_msg = devm_kzalloc(priv->dev, AUTO_UPDATE_FEATURE_RESP_SIZE * sizeof(response_msg),
170+
response_msg = devm_kzalloc(priv->dev, AUTO_UPDATE_FEATURE_RESP_SIZE * sizeof(*response_msg),
171171
GFP_KERNEL);
172172
if (!response_msg)
173173
return -ENOMEM;

0 commit comments

Comments
 (0)