From patchwork Fri Dec 14 21:49:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 10731699 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3E6001575 for ; Fri, 14 Dec 2018 21:50:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E06032D6B9 for ; Fri, 14 Dec 2018 21:50:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D363F2D73A; Fri, 14 Dec 2018 21:50:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0BEFC2D6BF for ; Fri, 14 Dec 2018 21:50:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730952AbeLNVuB (ORCPT ); Fri, 14 Dec 2018 16:50:01 -0500 Received: from mail.kernel.org ([198.145.29.99]:48004 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730734AbeLNVuB (ORCPT ); Fri, 14 Dec 2018 16:50:01 -0500 Received: from mail.kernel.org (unknown [104.132.0.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DDADA2086D; Fri, 14 Dec 2018 21:50:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544824201; bh=KJ4xo3XlylGcEUsVeQVGwT3irBkYd0CC/9e7cbPK/ns=; h=From:To:Cc:Subject:Date:From; b=BC8ANbEO0TGcULe7/GOfYrEyPSVxhYRd8L9Q7pIsBNrzv91GfNBzJxRPoHJT175rz bcbMeYRtA/TJua+P6yV33G1gW9PPZD3nanL43IF4Ft9iOYUaosw/i41jateWl8X/OY aGUtWwyWQihtQvJvI9NTkXVzs+u/ieq/OSpAYFMU= From: Stephen Boyd To: Michael Turquette , Stephen Boyd Cc: linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, Marek Vasut , Alexey Firago , Laurent Pinchart , linux-renesas-soc@vger.kernel.org Subject: [PATCH] clk: vc5: Initialize src in vc5_mux_set_parent() Date: Fri, 14 Dec 2018 13:49:59 -0800 Message-Id: <20181214214959.162744-1-sboyd@kernel.org> X-Mailer: git-send-email 2.20.0.405.gbc1bbc6f85-goog MIME-Version: 1.0 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP It seems that it may be possible to get to the regmap update call without ever initializing this variable, so just set it to 0 to be safe. Cc: Marek Vasut Cc: Alexey Firago Cc: Laurent Pinchart Cc: linux-renesas-soc@vger.kernel.org Signed-off-by: Stephen Boyd --- drivers/clk/clk-versaclock5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/clk-versaclock5.c b/drivers/clk/clk-versaclock5.c index 5b393e711e94..026f76276933 100644 --- a/drivers/clk/clk-versaclock5.c +++ b/drivers/clk/clk-versaclock5.c @@ -246,7 +246,7 @@ static int vc5_mux_set_parent(struct clk_hw *hw, u8 index) struct vc5_driver_data *vc5 = container_of(hw, struct vc5_driver_data, clk_mux); const u8 mask = VC5_PRIM_SRC_SHDN_EN_XTAL | VC5_PRIM_SRC_SHDN_EN_CLKIN; - u8 src; + u8 src = 0; if ((index > 1) || !vc5->clk_mux_ins) return -EINVAL;