mirror of
https://github.com/torvalds/linux.git
synced 2024-11-25 21:51:40 +00:00
ALSA: isight: fix leak of reference to firewire unit in error path of .probe callback
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>
This commit is contained in:
parent
e7bb6ad568
commit
51e68fb092
@ -638,7 +638,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);
|
||||
|
||||
@ -667,12 +667,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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user