lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150403125727.GT10964@mwanda>
Date:	Fri, 3 Apr 2015 15:57:27 +0300
From:	Dan Carpenter <dan.carpenter@...cle.com>
To:	Geert Uytterhoeven <geert+renesas@...der.be>
Cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Magnus Damm <damm+renesas@...nsource.se>,
	Arnd Bergmann <arnd@...db.de>,
	Simon Horman <horms+renesas@...ge.net.au>,
	Laurent Pinchart <Laurent.pinchart@...asonboard.com>,
	Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>,
	devel@...verdev.osuosl.org, devicetree@...r.kernel.org,
	linux-pm@...r.kernel.org, Marc Zyngier <marc.zyngier@....com>,
	linux-sh@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH/RFC 5/6] staging: board: Add support for devices with
 complex dependencies

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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ