Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp6021654ybc; Wed, 27 Nov 2019 13:33:06 -0800 (PST) X-Google-Smtp-Source: APXvYqyurZUVdi+PJA3cLCRE4hFhSOQVL1H696ZsbvYdzvjhpkyq3bk831xVrsZATcIzwQJIgARM X-Received: by 2002:aa7:d904:: with SMTP id a4mr29990873edr.44.1574890386804; Wed, 27 Nov 2019 13:33:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574890386; cv=none; d=google.com; s=arc-20160816; b=e5M2ZGgLmZb21w+7gGVO2LN8ZNPtpV+bj37Gv+NqT7EDp5d8pQGngf/1LiW4K/cdns UVd36towe/NS3oxj1l2zffbt1BXiULDYxUnQvTGdbpXE8VZBINYXsAOyyHFdCB0FU6LO prE7TMoLx4yYc2Kzb2GLraV4WUlmFQW5/F9sbri/9Q/JrtkeIiCmcbLXKi0EeLlHI/4N 48GsTiQkiyDO2GqjCfu9KykTDyuv/o2Jt4cqtI0f3h81ni1/i0ADY+USYcVVkinAbmE+ uRnKtDZPV8JiW6FstkVF7r8ROSdg1QOPJVsRfWlMJMu7s5VuASvM8a/HCIf3P9PrW1ge YbiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+LcyjNQsTO0WodYiQpktbpNO3VOSLDJh9G+if0UfLdQ=; b=AdgxkZ8RgELq+pU6QczbOQY6EUnObXHXVd4NdcE19TlaRRHobrta+8D3bbzpPfAfXV Z1JIM9rn2afNvb2TkScZ97mxKeuSGpLOB/gGkmbUJ2MRpwEGFbySbsd1sWgEP0qHMoWK AYGYzxLFBOBRDGBVQ1vU7InzwFOkRwjZMMdSCBYLEFxinyg/nuKj60n2LYMwHaADik8c YQlqfSNrqUxo6ZsQhHPIhi9VPNimUcFTrnDoFyR/MSddPadiYSW457bLiw1KQB3EkFUT 3aEXAor+zKZWasSvnruJCpUKDkYuLVrYvzXvwbLltcfQ/xotD4YiURiTTkeWa3p4IWeT Ul4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cF4IhWUU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i20si11589467edv.245.2019.11.27.13.32.43; Wed, 27 Nov 2019 13:33:06 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cF4IhWUU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731017AbfK0Va3 (ORCPT + 99 others); Wed, 27 Nov 2019 16:30:29 -0500 Received: from mail.kernel.org ([198.145.29.99]:46300 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730989AbfK0Uzp (ORCPT ); Wed, 27 Nov 2019 15:55:45 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 49AFE2068E; Wed, 27 Nov 2019 20:55:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574888144; bh=8bxpyTayDO1IguOcBDdmMf7HebvpmIjmrxBF6bdJCP0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cF4IhWUULlHgwpl5FBkkpoqRytMNs0IUu7K+LK994cJItm5nT0uAxTCh2IW0fa0Ul CCDQ2BGMZL9PkwzDf3neapVD3QaeWI4Rc6uupf2TuTWjJRLbFf8Nsn8vzok/Ij4TqH mJBqa+zcvw0Xb9GVesrGXLCBFQZxH3vjMURMfmqA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Takashi Sakamoto , Takashi Iwai , Sasha Levin Subject: [PATCH 4.19 022/306] ALSA: isight: fix leak of reference to firewire unit in error path of .probe callback Date: Wed, 27 Nov 2019 21:27:52 +0100 Message-Id: <20191127203116.313964901@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127203114.766709977@linuxfoundation.org> References: <20191127203114.766709977@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Takashi Sakamoto [ 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 Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin --- sound/firewire/isight.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sound/firewire/isight.c b/sound/firewire/isight.c index 30957477e005e..0717ab9e48e3b 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; } -- 2.20.1