From mboxrd@z Thu Jan 1 00:00:00 1970 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753807AbcIVLEc (ORCPT ); Thu, 22 Sep 2016 07:04:32 -0400 Received: from helcar.hengli.com.au ([209.40.204.226]:56170 "EHLO helcar.hengli.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751586AbcIVLE3 (ORCPT ); Thu, 22 Sep 2016 07:04:29 -0400 Date: Thu, 22 Sep 2016 18:46:24 +0800 From: Herbert Xu To: Dave Gerlach Cc: Deepak Saxena , Matt Mackall , Nishanth Menon , linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org Subject: Re: [PATCH] hwrng: omap - Only fail if pm_runtime_get_sync returns < 0 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-Disposition: inline In-Reply-To: <20160920152540.3004-1-d-gerlach@ti.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: herbert@gondor.apana.org.au (Herbert Xu) Date: Thu, 22 Sep 2016 18:46:24 +0800 Subject: [PATCH] hwrng: omap - Only fail if pm_runtime_get_sync returns < 0 In-Reply-To: <20160920152540.3004-1-d-gerlach@ti.com> References: <20160920152540.3004-1-d-gerlach@ti.com> Message-ID: <20160922104624.GK5884@gondor.apana.org.au> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.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