[PATCH v2] console: console: Complete exception handling in newport_probe()

2020-04-23 Thread Dejin Zheng
A call of the function ¡°do_take_over_console¡± can fail here. The corresponding system resources were not released then. Thus add a call of the function ¡°iounmap¡± together with the check of a failure predicate. Fixes: e84de0c6190503 ("MIPS: GIO bus support for SGI IP22/28") CC: Andy Shevchenko

Re: [PATCH v2] console: console: Complete exception handling in newport_probe()

2020-04-23 Thread Dejin Zheng
On Thu, Apr 23, 2020 at 05:52:09PM +0300, Andy Shevchenko wrote: > On Thu, Apr 23, 2020 at 5:26 PM Dejin Zheng wrote: > > > > A call of the function do_take_over_console() can fail here. > > The corresponding system resources were not released then. > > Thus add a call of the function iounmap()

Re: [PATCH v2] console: console: Complete exception handling in newport_probe()

2020-04-23 Thread Dejin Zheng
On Thu, Apr 23, 2020 at 04:55:35PM +0200, Bartlomiej Zolnierkiewicz wrote: > > Hi, > > I believe that the patch summary line should be: > > "[PATCH v2] console: newport_con: ..." > OK, thanks! > On 4/23/20 4:26 PM, Dejin Zheng wrote: > > A call of the function ¡°do_take_over_console¡± can fail

Re: [PATCH v2] console: console: Complete exception handling in newport_probe()

2020-04-23 Thread Bartlomiej Zolnierkiewicz
On 4/23/20 5:05 PM, Andy Shevchenko wrote: > On Thu, Apr 23, 2020 at 5:55 PM Bartlomiej Zolnierkiewicz > wrote: > >>> + if (err) >>> + iounmap((void *)npregs); >> >> Looks OK but while you are at it, could you please also add missing >> release_mem_region() on error and on

Re: [PATCH v2] console: console: Complete exception handling in newport_probe()

2020-04-23 Thread Andy Shevchenko
On Thu, Apr 23, 2020 at 5:55 PM Bartlomiej Zolnierkiewicz wrote: > > + if (err) > > + iounmap((void *)npregs); > > Looks OK but while you are at it, could you please also add missing > release_mem_region() on error and on device removal: > > newport_addr =

Re: [PATCH v2] console: console: Complete exception handling in newport_probe()

2020-04-23 Thread Bartlomiej Zolnierkiewicz
Hi, I believe that the patch summary line should be: "[PATCH v2] console: newport_con: ..." On 4/23/20 4:26 PM, Dejin Zheng wrote: > A call of the function ¡°do_take_over_console¡± can fail here. > The corresponding system resources were not released then. > Thus add a call of the function

Re: [PATCH v2] console: console: Complete exception handling in newport_probe()

2020-04-23 Thread Andy Shevchenko
On Thu, Apr 23, 2020 at 5:26 PM Dejin Zheng wrote: > > A call of the function ¡°do_take_over_console¡± can fail here. > The corresponding system resources were not released then. > Thus add a call of the function ¡°iounmap¡± together with the check > of a failure predicate. ... > CC: Andy