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: <20181116161122.hhvslbzdujxpk3up@pengutronix.de>
Date:   Fri, 16 Nov 2018 17:11:22 +0100
From:   Uwe Kleine-König 
        <u.kleine-koenig@...gutronix.de>
To:     Phil Edworthy <phil.edworthy@...esas.com>
Cc:     Stephen Boyd <sboyd@...nel.org>,
        Michael Turquette <mturquette@...libre.com>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Russell King <linux@...linux.org.uk>,
        linux-clk@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-renesas-soc@...r.kernel.org,
        Geert Uytterhoeven <geert@...ux-m68k.org>,
        linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v6 1/6] clk: Add of_clk_get_by_name_optional() function

On Fri, Nov 16, 2018 at 05:01:28PM +0100, Uwe Kleine-König wrote:
> Other than that I think the patch is fine

Thinking again, I wonder why not just do:

static inline struct clk *clk_get_optional(struct device *dev, const char *id)
{
	struct clk *c = clk_get(dev, id);

	if (c == ERR_PTR(-ENOENT))
		return NULL;
	else
		return c;
}

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ