soundwire: intel: fix inversion in devm_kcalloc parameters
the number of elements and size are inverted, fix. This probably only worked because the number of properties is hard-coded to 1. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
Родитель
bfeffd1552
Коммит
4ac5627acc
|
@ -796,8 +796,8 @@ static int intel_prop_read(struct sdw_bus *bus)
|
||||||
|
|
||||||
/* BIOS is not giving some values correctly. So, lets override them */
|
/* BIOS is not giving some values correctly. So, lets override them */
|
||||||
bus->prop.num_freq = 1;
|
bus->prop.num_freq = 1;
|
||||||
bus->prop.freq = devm_kcalloc(bus->dev, sizeof(*bus->prop.freq),
|
bus->prop.freq = devm_kcalloc(bus->dev, bus->prop.num_freq,
|
||||||
bus->prop.num_freq, GFP_KERNEL);
|
sizeof(*bus->prop.freq), GFP_KERNEL);
|
||||||
if (!bus->prop.freq)
|
if (!bus->prop.freq)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче