Skip to content

Commit 76ea60f

Browse files
committed
Merge tag 'soundwire-5.8-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire into char--misc-linus
Vinod writes: soundwire fixes for v5.8 - Intel driver memory leak fix * tag 'soundwire-5.8-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire: soundwire: intel: fix memory leak with devm_kasprintf
2 parents bf12fdf + bf6d6e6 commit 76ea60f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/soundwire/intel.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -930,8 +930,9 @@ static int intel_create_dai(struct sdw_cdns *cdns,
930930

931931
/* TODO: Read supported rates/formats from hardware */
932932
for (i = off; i < (off + num); i++) {
933-
dais[i].name = kasprintf(GFP_KERNEL, "SDW%d Pin%d",
934-
cdns->instance, i);
933+
dais[i].name = devm_kasprintf(cdns->dev, GFP_KERNEL,
934+
"SDW%d Pin%d",
935+
cdns->instance, i);
935936
if (!dais[i].name)
936937
return -ENOMEM;
937938

0 commit comments

Comments
 (0)