diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2018-10-12 14:25:22 +0900 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-12-01 09:16:13 +0100 |
commit | 3757657af27ea8314c05f78dbae3105d2b40ed29 (patch) | |
tree | 0aaf12fb63d48939b776bca3e91cce15db38b2a9 /sound | |
parent | 49a9643b5e8d305876f8de52af7946379c77033d (diff) | |
download | linux-stable-3757657af27ea8314c05f78dbae3105d2b40ed29.tar.gz linux-stable-3757657af27ea8314c05f78dbae3105d2b40ed29.tar.bz2 linux-stable-3757657af27ea8314c05f78dbae3105d2b40ed29.zip |
ALSA: isight: fix leak of reference to firewire unit in error path of .probe callback
[ Upstream commit 51e68fb0929c29e47e9074ca3e99ffd6021a1c5a ]
In some error paths, reference count of firewire unit is not decreased.
This commit fixes the bug.
Fixes: 5b14ec25a79b('ALSA: firewire: release reference count of firewire unit in .remove callback of bus driver')
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/firewire/isight.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/firewire/isight.c b/sound/firewire/isight.c index 30957477e005..0717ab9e48e3 100644 --- a/sound/firewire/isight.c +++ b/sound/firewire/isight.c @@ -640,7 +640,7 @@ static int isight_probe(struct fw_unit *unit, if (!isight->audio_base) { dev_err(&unit->device, "audio unit base not found\n"); err = -ENXIO; - goto err_unit; + goto error; } fw_iso_resources_init(&isight->resources, unit); @@ -669,12 +669,12 @@ static int isight_probe(struct fw_unit *unit, dev_set_drvdata(&unit->device, isight); return 0; - -err_unit: - fw_unit_put(isight->unit); - mutex_destroy(&isight->mutex); error: snd_card_free(card); + + mutex_destroy(&isight->mutex); + fw_unit_put(isight->unit); + return err; } |