From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:42798 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728379AbeIHB7s (ORCPT ); Fri, 7 Sep 2018 21:59:48 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lihua Yao , Robert Jarzmik , Takashi Iwai Subject: [PATCH 4.18 090/145] ALSA: ac97: fix check of pm_runtime_get_sync failure Date: Fri, 7 Sep 2018 23:09:16 +0200 Message-Id: <20180907210911.458008218@linuxfoundation.org> In-Reply-To: <20180907210903.617721278@linuxfoundation.org> References: <20180907210903.617721278@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: stable-owner@vger.kernel.org List-ID: 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Lihua Yao commit d15ec0b482ff502e4e19e43d15aa5072e4290199 upstream. pm_runtime_get_sync returns negative on failure. Fixes: 74426fbff66e ("ALSA: ac97: add an ac97 bus") Signed-off-by: Lihua Yao Acked-by: Robert Jarzmik Cc: Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- sound/ac97/bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/sound/ac97/bus.c +++ b/sound/ac97/bus.c @@ -503,7 +503,7 @@ static int ac97_bus_remove(struct device int ret; ret = pm_runtime_get_sync(dev); - if (ret) + if (ret < 0) return ret; ret = adrv->remove(adev);