diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2007-04-23 09:54:41 (GMT) |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2007-05-11 14:56:08 (GMT) |
commit | 479ef4369f65abf4c3e7bbe44ef934a465257ee1 (patch) | |
tree | 1ac2fe99d0e40178253002a8decfab6b5a70b924 /sound/drivers/portman2x4.c | |
parent | 9422db4018cbfaa1a330b018a2bf6527d282b417 (diff) | |
download | linux-479ef4369f65abf4c3e7bbe44ef934a465257ee1.tar.xz |
[ALSA] sound: fix incorrect use of platform_device_register()
The platform_device allocated by platform_device_alloc()
should be added to the device hierarchy by platform_device_add()
instead of platform_device_register().
Otherwise it will hit WARN_ON() in platform_device_register().
by illegal refcount.
This patch fixes such incorrect usages in portman2x4 and mts64 drivers.
Also it removes unnecessary trailing whitespaces.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/drivers/portman2x4.c')
-rw-r--r-- | sound/drivers/portman2x4.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/drivers/portman2x4.c b/sound/drivers/portman2x4.c index b2d0ba4..497cafb 100644 --- a/sound/drivers/portman2x4.c +++ b/sound/drivers/portman2x4.c @@ -676,13 +676,13 @@ static void __devinit snd_portman_attach(struct parport *p) struct platform_device *device; device = platform_device_alloc(PLATFORM_DRIVER, device_count); - if (!device) + if (!device) return; /* Temporary assignment to forward the parport */ platform_set_drvdata(device, p); - if (platform_device_register(device) < 0) { + if (platform_device_add(device) < 0) { platform_device_put(device); return; } |