Skip to content

Commit

Permalink
Merge tag 'soundwire-5.8-fixes' of git://git.kernel.org/pub/scm/linux…
Browse files Browse the repository at this point in the history
…/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
  • Loading branch information
Greg Kroah-Hartman committed Jul 8, 2020
2 parents bf12fdf + bf6d6e6 commit 76ea60f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/soundwire/intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -930,8 +930,9 @@ static int intel_create_dai(struct sdw_cdns *cdns,

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

Expand Down

0 comments on commit 76ea60f

Please sign in to comment.