From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751996AbbBLTAW (ORCPT ); Thu, 12 Feb 2015 14:00:22 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:40462 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751272AbbBLTAS (ORCPT ); Thu, 12 Feb 2015 14:00:18 -0500 Message-ID: <54DCF840.60709@codeaurora.org> Date: Thu, 12 Feb 2015 11:00:16 -0800 From: Stephen Boyd User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Javier Martinez Canillas , Mike Turquette CC: Tomeu Vizoso , =?windows-1252?Q?Emilio_?= =?windows-1252?Q?L=F3pez?= , Peter De Schrijver , Robert Jarzmik , Giuseppe Cavallaro , linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/3] clk: Don't dereference parent clock if is NULL References: <1423749510-14525-1-git-send-email-javier.martinez@collabora.co.uk> <1423749510-14525-2-git-send-email-javier.martinez@collabora.co.uk> In-Reply-To: <1423749510-14525-2-git-send-email-javier.martinez@collabora.co.uk> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/12/15 05:58, Javier Martinez Canillas wrote: > The clock passed as an argument to clk_mux_determine_rate_flags() > has the CLK_SET_RATE_PARENT flag set but it has no parent, then a > NULL pointer will tried to be dereferenced. > > This shouldn't happen since setting that flag for a clock with no > parent is a bug but the core should be robust to handle that case. > > Fixes: 035a61c314eb3 ("clk: Make clk API return per-user struct clk instances") > Signed-off-by: Javier Martinez Canillas Reviewed-by: Stephen Boyd -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project