From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750945AbdALWGe (ORCPT ); Thu, 12 Jan 2017 17:06:34 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:48960 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750730AbdALWGd (ORCPT ); Thu, 12 Jan 2017 17:06:33 -0500 DMARC-Filter: OpenDMARC Filter v1.3.1 smtp.codeaurora.org 0A9536120C Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=pass smtp.mailfrom=sboyd@codeaurora.org Date: Thu, 12 Jan 2017 14:06:27 -0800 From: Stephen Boyd To: Arnd Bergmann Cc: Michael Turquette , Maxime Coquelin , Alexandre Torgue , Gabriel Fernandez , Rob Herring , Christophe JAILLET , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] clk: stm32f4: avoid uninitialized variable access Message-ID: <20170112220627.GQ17126@codeaurora.org> References: <20170111134107.3821564-1-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170111134107.3821564-1-arnd@arndb.de> 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 01/11, Arnd Bergmann wrote: > The failure path in the newly added function tries to free an > uninitialized pointer: > > drivers/clk/clk-stm32f4.c: In function 'stm32f4_rcc_init': > drivers/clk/clk-stm32f4.c:1106:4: error: 'gate' may be used uninitialized in this function [-Werror=maybe-uninitialized] > > I'm adding an initialization to NULL here to make the kfree() > succeed, and I'm also rearranging the cleanup so that the > same kfree() is used for any error path, making the function > slightly more robust against newly introduced bugs in the > error handling. > > Fixes: daf2d117cbca ("clk: stm32f4: Add lcd-tft clock") > Signed-off-by: Arnd Bergmann > --- Applied to clk-next. Seems I need to update my compiler to find these warnings. -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project