summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-07-08 17:59:14 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-07-08 17:59:14 +0200
commit76ea60f771615d32c0c5caed81991b25a87e0137 (patch)
tree99a0d360ccfd21e6406f8ff7ce55174a59f812ff /drivers
parentbf12fdf0ab728ca8e5933aac46dd972c0dd0421e (diff)
parentbf6d6e68d2028a2d82f4c106f50ec75cc1e6ef89 (diff)
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
Diffstat (limited to 'drivers')
-rw-r--r--drivers/soundwire/intel.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c
index 4cfdd074e310..c7422740edd4 100644
--- a/drivers/soundwire/intel.c
+++ b/drivers/soundwire/intel.c
@@ -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;