From: Herbert Xu Subject: Re: [PATCH] hwrng: omap - Only fail if pm_runtime_get_sync returns < 0 Date: Thu, 22 Sep 2016 18:46:24 +0800 Message-ID: <20160922104624.GK5884@gondor.apana.org.au> References: <20160920152540.3004-1-d-gerlach@ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Nishanth Menon , Deepak Saxena , linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, Matt Mackall , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org To: Dave Gerlach Return-path: Content-Disposition: inline In-Reply-To: <20160920152540.3004-1-d-gerlach@ti.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org List-Id: linux-crypto.vger.kernel.org On Tue, Sep 20, 2016 at 10:25:40AM -0500, Dave Gerlach wrote: > Currently omap-rng checks the return value of pm_runtime_get_sync and > reports failure if anything is returned, however it should be checking > if ret < 0 as pm_runtime_get_sync return 0 on success but also can return > 1 if the device was already active which is not a failure case. Only > values < 0 are actual failures. > > Fixes: 61dc0a446e5d ("hwrng: omap - Fix assumption that runtime_get_sync will always succeed") > Signed-off-by: Dave Gerlach Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt