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/ |
