The reference returned by acpi_dev_get_first_match_dev() is already released right after the physical node is looked up. The adev variable is not reassigned afterwards, so the acpi_dev_put() on the err path is a second, spurious put of the same device, which unbalances the reference count, or frees the device while physdev may still be in use. Drop the redundant acpi_dev_put() from the error path. Fixes: bb5f86ea50ff ("ALSA: hda/tas2781: Add tas2781 hda SPI driver") Cc: stable@vger.kernel.org Signed-off-by: Wentao Liang --- sound/hda/codecs/side-codecs/tas2781_hda_spi.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sound/hda/codecs/side-codecs/tas2781_hda_spi.c b/sound/hda/codecs/side-codecs/tas2781_hda_spi.c index 0e4f3553f273..63f8b15c2d8c 100644 --- a/sound/hda/codecs/side-codecs/tas2781_hda_spi.c +++ b/sound/hda/codecs/side-codecs/tas2781_hda_spi.c @@ -386,7 +386,6 @@ static int tas2781_read_acpi(struct tas2781_hda *tas_hda, err: dev_err(p->dev, "read acpi error, ret: %d\n", ret); put_device(physdev); - acpi_dev_put(adev); return ret; } -- 2.34.1