Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751528AbdGRPzp (ORCPT ); Tue, 18 Jul 2017 11:55:45 -0400 Received: from mail-oi0-f45.google.com ([209.85.218.45]:32789 "EHLO mail-oi0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751353AbdGRPzn (ORCPT ); Tue, 18 Jul 2017 11:55:43 -0400 MIME-Version: 1.0 In-Reply-To: <20170718154521.GA7132@localhost> References: <032e9a8b-8013-fe60-4a49-11cbf5cc28ed@ispras.ru> <1500377531-28358-1-git-send-email-khoroshilov@ispras.ru> <20170718154521.GA7132@localhost> From: Andy Shevchenko Date: Tue, 18 Jul 2017 18:55:42 +0300 Message-ID: Subject: Re: [PATCH v2] serial: 8250: fix error handling in of_platform_serial_probe() To: Johan Hovold Cc: Alexey Khoroshilov , Greg Kroah-Hartman , Jiri Slaby , Arnd Bergmann , "linux-serial@vger.kernel.org" , "linux-kernel@vger.kernel.org" , ldv-project@linuxtesting.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 706 Lines: 21 On Tue, Jul 18, 2017 at 6:45 PM, Johan Hovold 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