From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752091AbcBKLeQ (ORCPT ); Thu, 11 Feb 2016 06:34:16 -0500 Received: from mail-pf0-f182.google.com ([209.85.192.182]:35814 "EHLO mail-pf0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751248AbcBKLeN (ORCPT ); Thu, 11 Feb 2016 06:34:13 -0500 Date: Thu, 11 Feb 2016 17:04:09 +0530 From: Viresh Kumar To: Jon Hunter Cc: Viresh Kumar , Nishanth Menon , Stephen Boyd , "Rafael J. Wysocki" , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org Subject: Re: [PATCH] PM / OPP: Fix NULL pointer dereference crash when disabling OPPs Message-ID: <20160211113409.GA28558@vireshk> References: <1455189959-27944-1-git-send-email-jonathanh@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1455189959-27944-1-git-send-email-jonathanh@nvidia.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11-02-16, 11:25, Jon Hunter wrote: > Commit 7d34d56ef334 ("PM / OPP: Disable OPPs that aren't supported by > the regulator") disables OPPs that are not supported by the regulator. > This is causes a crash on Tegra124 Jetson TK1 when using the DFLL clock > source for the CPU. The DFLL manages the voltage itself and so there is > no regulator specified for the OPPs and so we get a crash when we try to > dereference the regulator pointer. Fix this by checking to see if the > regulator IS_ERR_OR_NULL before dereferencing it. > > Fixes: 7d34d56ef334 ("PM / OPP: Disable OPPs that aren't supported by the > regulator") > > Signed-off-by: Jon Hunter > --- > drivers/base/power/opp/core.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Sorry about that :( Acked-by: Viresh Kumar -- viresh