public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: question about hvc_opal.c
       [not found] <CAB78YHynbQ=cR-jDTHpwwVGgDO24fjXETO1Zp88QD=Vkjf+6GQ@mail.gmail.com>
@ 2014-05-16 18:26 ` Greg KH
  0 siblings, 0 replies; only message in thread
From: Greg KH @ 2014-05-16 18:26 UTC (permalink / raw)
  To: Himangi Saraogi; +Cc: jslaby, linuxppc-dev, linux-kernel, Julia Lawall

On Fri, May 16, 2014 at 11:34:13PM +0530, Himangi Saraogi wrote:
> Hi,
>  
> In function hvc_opal_probe I find :
> 
>         hp = hvc_alloc(termno, 0, ops, MAX_VIO_PUT_CHARS);
>         if (IS_ERR(hp))
>                 return PTR_ERR(hp);
> 
> Earlier, hpc_opal_privs[termno] is assigned pv which is allocated using
> kzalloc. Shouldn't there be a kfree(pv) and the array element (which is global)
> be made NULL before the return. Also, if array element is set to NULL on the
> failure, then some cleanup must be done to undo the effect of hvc_instantiate
> as well. Please let me know if the change is desirable.

Sounds reasonable, please send a patch.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-05-16 18:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CAB78YHynbQ=cR-jDTHpwwVGgDO24fjXETO1Zp88QD=Vkjf+6GQ@mail.gmail.com>
2014-05-16 18:26 ` question about hvc_opal.c Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox