diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/samsung/i2s.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index 309badc97290..70c827162be4 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c @@ -1349,6 +1349,10 @@ static int i2s_create_secondary_device(struct samsung_i2s_priv *priv) return -ENOMEM; pdev_sec->driver_override = kstrdup("samsung-i2s", GFP_KERNEL); + if (!pdev_sec->driver_override) { + platform_device_put(pdev_sec); + return -ENOMEM; + } ret = platform_device_add(pdev_sec); if (ret < 0) { |