aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/core/sound.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/core/sound.c b/sound/core/sound.c
index 8dc7a3b32b98..f6ebce08b537 100644
--- a/sound/core/sound.c
+++ b/sound/core/sound.c
@@ -266,6 +266,14 @@ int snd_register_device_for_dev(int type, struct snd_card *card, int dev,
266 snd_minors[minor] = preg; 266 snd_minors[minor] = preg;
267 preg->dev = device_create(sound_class, device, MKDEV(major, minor), 267 preg->dev = device_create(sound_class, device, MKDEV(major, minor),
268 "%s", name); 268 "%s", name);
269 if (IS_ERR(preg->dev)) {
270 snd_minors[minor] = NULL;
271 mutex_unlock(&sound_mutex);
272 minor = PTR_ERR(preg->dev);
273 kfree(preg);
274 return minor;
275 }
276
269 if (preg->dev) 277 if (preg->dev)
270 dev_set_drvdata(preg->dev, private_data); 278 dev_set_drvdata(preg->dev, private_data);
271 279