Re: [PATCH] mailbox: imx: Fix clk handling in imx_mu_probe()

2018-12-16 Thread Oleksij Rempel
On 17.12.18 08:24, Alexey Khoroshilov wrote: Hi Oleksij, By chance I took a look at another implementations: arch/arm/mach-ep93xx/clock.c#L266 int clk_enable(struct clk *clk) { unsigned long flags; if (!clk) return -EINVAL; ... arch/c6x/platforms/pll.c#L48

Re: [PATCH] mailbox: imx: Fix clk handling in imx_mu_probe()

2018-12-16 Thread Alexey Khoroshilov
Hi Oleksij, By chance I took a look at another implementations: arch/arm/mach-ep93xx/clock.c#L266 int clk_enable(struct clk *clk) { unsigned long flags; if (!clk) return -EINVAL; ... arch/c6x/platforms/pll.c#L48 int clk_enable(struct clk *clk) { unsigne

Re: [PATCH] mailbox: imx: Fix clk handling in imx_mu_probe()

2018-12-16 Thread Oleksij Rempel
Hi Alexey, On Sun, Dec 16, 2018 at 02:01:44AM +0300, Alexey Khoroshilov wrote: > Handling of devm_clk_get() suggests that the driver should support > lack of priv->clk. But imx_mu_probe() fails on clk_prepare_enable(NULL) > in that case. > > The patch removes the try to enable absent clk and adds

[PATCH] mailbox: imx: Fix clk handling in imx_mu_probe()

2018-12-15 Thread Alexey Khoroshilov
Handling of devm_clk_get() suggests that the driver should support lack of priv->clk. But imx_mu_probe() fails on clk_prepare_enable(NULL) in that case. The patch removes the try to enable absent clk and adds error handling for mbox_controller_register(). Found by Linux Driver Verification projec