Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3706724ybv; Mon, 10 Feb 2020 05:04:28 -0800 (PST) X-Google-Smtp-Source: APXvYqy2sM5D2LlW1B6KX8FhZLPQ5KEJysJN/DaqV0NPC26+M7V2im43VS1o8sfEKLHKmScZhI04 X-Received: by 2002:a05:6808:84:: with SMTP id s4mr745600oic.147.1581339868199; Mon, 10 Feb 2020 05:04:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581339868; cv=none; d=google.com; s=arc-20160816; b=sjq5qDE0E1HpyCNI94M3Wm/JnosY7S0jraC6e6pKG9p3xEUigjvODtIuYTdgKFy9gG x/nb6ftrcXq4dqAxAwMlWCC2blxyooN4WTjIPuHH9mYuyWiCsUVG3U2oLpff4mpgMmIE qLLSqTsGf39dWmw1ETHlM8jn+6AECNobwpJdvpe/nhUvZ2bOitEbMwfprqx5odIAoRP/ XZzsENRjXru7Q99ETE7CrbyrZSlITWNxUnQ6fYuK8DjvWefD2hKAD39A0rSctWc/cx9f Nr6Qx7jwI1MDApqioK3CbLcUkdxfGd/Pkg/ZVtti89KOv/sCGhnf84zaEuMmI65XYOkO do9g== 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=eOmquQ67UmM4JVp5QgSqPLI+w2cfjGZNNdUBtQ96Y8E=; b=MYT4Ea2j6pOv0C822qWrnW5UibB06CPcLexPdnJ4Xo5pE0/PtO0v5c0HBzqu5+Ylgd 4kYYWTAmwREAPzMwstWP9CZeJg2CrffL2T2V2aWWgPIuGla7iB+h27W+tdDg7zqllUH4 Rk4iV5g/7r6Cua4eXYwfnuMOPaUj4Jp7leSRJswTJ1AQQVKQJpspbQziI0gPrgTMOBaj E/YS5NafcPP14wQnSjaslmeVVI/I0qUVNwty6BwlKDkq3Rp+pzbNRH1cCxOLShc4MHI+ f5vjIAtwxxe95yRDE17TYlp8EUfeEJSsGlP3qH81uAyi+syCZgUM1MxuFb7kky53JvIh JZ0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=xLt5eOT4; 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 a8si154722otp.258.2020.02.10.05.04.13; Mon, 10 Feb 2020 05:04:28 -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=xLt5eOT4; 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 S1730710AbgBJNDa (ORCPT + 99 others); Mon, 10 Feb 2020 08:03:30 -0500 Received: from mail.kernel.org ([198.145.29.99]:40296 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729719AbgBJMkX (ORCPT ); Mon, 10 Feb 2020 07:40:23 -0500 Received: from localhost (unknown [209.37.97.194]) (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 67ADC20661; Mon, 10 Feb 2020 12:40:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581338423; bh=HoMHbtbOrBm2LgfG24633FywPA+dHpw7bVzGwSr2CFA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xLt5eOT4fnbkdQOT3KWD3CLggILXWbJ9CT2KVtkjMf2Ty7wB/5Xr4o0lRqYmO/9M+ 9FXxaw/JuaJevat6Wb3H0uPjE7s94h/VIWBvMXUhvxKtoZdxYDsq2BplnxQTtdwMXH tzETCCfQOxsLbHsZPgzPBwdS/Eu+LO2i3V6xDYGs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Gilad Ben-Yossef , Herbert Xu Subject: [PATCH 5.5 117/367] crypto: ccree - fix pm wrongful error reporting Date: Mon, 10 Feb 2020 04:30:30 -0800 Message-Id: <20200210122435.441599103@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200210122423.695146547@linuxfoundation.org> References: <20200210122423.695146547@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: Gilad Ben-Yossef commit cedca59fae5834af8445b403c66c9953754375d7 upstream. pm_runtime_get_sync() can return 1 as a valid (none error) return code. Treat it as such. Signed-off-by: Gilad Ben-Yossef Cc: stable@vger.kernel.org # v4.19+ Signed-off-by: Herbert Xu Signed-off-by: Greg Kroah-Hartman --- drivers/crypto/ccree/cc_pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/crypto/ccree/cc_pm.c +++ b/drivers/crypto/ccree/cc_pm.c @@ -85,7 +85,7 @@ int cc_pm_get(struct device *dev) else pm_runtime_get_noresume(dev); - return rc; + return (rc == 1 ? 0 : rc); } int cc_pm_put_suspend(struct device *dev)