Re: [PATCH v2] serial: 8250: fix error handling in of_platform_serial_probe()

From: Andy Shevchenko
Date: Tue Jul 18 2017 - 11:55:49 EST


On Tue, Jul 18, 2017 at 6:45 PM, Johan Hovold <johan@xxxxxxxxxx> wrote:
> On Tue, Jul 18, 2017 at 02:32:11PM +0300, Alexey Khoroshilov wrote:
>> clk_disable_unprepare(info->clk) is missed in of_platform_serial_probe(),
>> while irq_dispose_mapping(port->irq) is missed in of_platform_serial_setup().

>> +err_register:
>> irq_dispose_mapping(port8250.port.irq);
>> + if (info->clk)
>> + clk_disable_unprepare(info->clk);
>> +err_setup:
>> + kfree(info);
>
> Please name also these error labels after what they do rather than after
> from where you jump to them (i.e. as you did above in
> of_platform_serial_setup()).

Actually good point!

--
With Best Regards,
Andy Shevchenko