Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753397AbbDCNAd (ORCPT ); Fri, 3 Apr 2015 09:00:33 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:30075 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753051AbbDCNA1 (ORCPT ); Fri, 3 Apr 2015 09:00:27 -0400 Date: Fri, 3 Apr 2015 15:57:27 +0300 From: Dan Carpenter To: Geert Uytterhoeven Cc: Greg Kroah-Hartman , Magnus Damm , Arnd Bergmann , Simon Horman , Laurent Pinchart , Kuninori Morimoto , devel@driverdev.osuosl.org, devicetree@vger.kernel.org, linux-pm@vger.kernel.org, Marc Zyngier , linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH/RFC 5/6] staging: board: Add support for devices with complex dependencies Message-ID: <20150403125727.GT10964@mwanda> References: <1428064923-24950-1-git-send-email-geert+renesas@glider.be> <1428064923-24950-6-git-send-email-geert+renesas@glider.be> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1428064923-24950-6-git-send-email-geert+renesas@glider.be> User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: userv0022.oracle.com [156.151.31.74] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1073 Lines: 36 On Fri, Apr 03, 2015 at 02:42:02PM +0200, Geert Uytterhoeven wrote: > +int __init board_staging_register_clock(const struct board_staging_clk *bsc) > +{ > + struct clk *clk; > + int error; > + > + pr_debug("Registering clock %s for con_id %s dev_id %s\n", bsc->clk, > + bsc->con_id, bsc->dev_id); > + clk = clk_get(NULL, bsc->clk); > + if (IS_ERR(clk)) { > + error = PTR_ERR(clk); > + pr_err("Failed to get clock %s (%d)\n", bsc->clk, error); > + return error; > + } > + > + error = clk_register_clkdev(clk, bsc->con_id, bsc->dev_id); > + if (error) > + pr_err("Failed to register clock %s (%d)\n", bsc->clk, error); > + return error; Missing curly braces. Also it's weird that don't we need a clk_put() on the error patch as well as the success path? > + > + clk_put(clk); > + return 0; > +} regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/