From patchwork Sun Jul 3 06:06:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 9211181 X-Patchwork-Delegate: mturquette@baylibre.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0A7E560752 for ; Sun, 3 Jul 2016 06:14:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DA99B285BF for ; Sun, 3 Jul 2016 06:14:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BE96C285CF; Sun, 3 Jul 2016 06:14:22 +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=-6.9 required=2.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=ham 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 4FFF7285BF for ; Sun, 3 Jul 2016 06:14:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751199AbcGCGOU (ORCPT ); Sun, 3 Jul 2016 02:14:20 -0400 Received: from smtp05.smtpout.orange.fr ([80.12.242.127]:27904 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750795AbcGCGOU (ORCPT ); Sun, 3 Jul 2016 02:14:20 -0400 X-Greylist: delayed 451 seconds by postgrey-1.27 at vger.kernel.org; Sun, 03 Jul 2016 02:14:19 EDT Received: from localhost.localdomain ([92.140.234.177]) by mwinf5d61 with ME id E66l1t00L3qK9cU0366ls9; Sun, 03 Jul 2016 08:06:46 +0200 X-ME-Helo: localhost.localdomain X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sun, 03 Jul 2016 08:06:46 +0200 X-ME-IP: 92.140.234.177 From: Christophe JAILLET To: mturquette@baylibre.com, sboyd@codeaurora.org, mcoquelin.stm32@gmail.com Cc: linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH] clk: stm32f4: fix error handling Date: Sun, 3 Jul 2016 08:06:43 +0200 Message-Id: <1467526003-13318-1-git-send-email-christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.7.4 X-Antivirus: avast! (VPS 160702-1, 02/07/2016), Outbound message X-Antivirus-Status: Clean Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This is likely that checking 'clks[idx]' instead of 'clks[n]' is expected here. Signed-off-by: Christophe JAILLET --- drivers/clk/clk-stm32f4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/clk-stm32f4.c b/drivers/clk/clk-stm32f4.c index b6ca33f..02d6810 100644 --- a/drivers/clk/clk-stm32f4.c +++ b/drivers/clk/clk-stm32f4.c @@ -364,7 +364,7 @@ static void __init stm32f4_rcc_init(struct device_node *np) NULL, gd->name, gd->parent_name, gd->flags, base + gd->offset, gd->bit_idx, 0, &stm32f4_clk_lock); - if (IS_ERR(clks[n])) { + if (IS_ERR(clks[idx])) { pr_err("%s: Unable to register leaf clock %s\n", np->full_name, gd->name); goto fail;