Skip to content
Snippets Groups Projects
Commit dca18a94 authored by Colin Ian King's avatar Colin Ian King Committed by Takashi Iwai
Browse files

ALSA: sc6000: Fix incorrect sizeof operator


Static analysis is warning that the sizeof being used is should be
of *vport and not vport. Although these are the same size it is not
a portable assumption to assume this is true for all cases.  Fix this
by using sizeof(*vport).

Addresses-Coverity: ("Sizeof not portable")
Fixes: 111601ff ("ALSA: sc6000: Allocate resources with device-managed APIs")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20210720161707.74197-1-colin.king@canonical.com


Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent e24ef488
No related branches found
No related tags found
No related merge requests found
......@@ -552,7 +552,7 @@ static int snd_sc6000_probe(struct device *devptr, unsigned int dev)
err = snd_devm_card_new(devptr, index[dev], id[dev], THIS_MODULE,
sizeof(vport), &card);
sizeof(*vport), &card);
if (err < 0)
return err;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment