public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation•org>
To: Himangi Saraogi <himangi774@gmail•com>
Cc: linuxppc-dev@lists•ozlabs.org, jslaby@suse•cz,
	linux-kernel@vger•kernel.org, Julia Lawall <julia.lawall@lip6•fr>
Subject: Re: question about hvc_opal.c
Date: Fri, 16 May 2014 11:26:57 -0700	[thread overview]
Message-ID: <20140516182657.GA15475@kroah.com> (raw)
In-Reply-To: <CAB78YHynbQ=cR-jDTHpwwVGgDO24fjXETO1Zp88QD=Vkjf+6GQ@mail.gmail.com>

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.

      reply	other threads:[~2014-05-16 18:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-16 18:04 question about hvc_opal.c Himangi Saraogi
2014-05-16 18:26 ` Greg KH [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140516182657.GA15475@kroah.com \
    --to=gregkh@linuxfoundation$(echo .)org \
    --cc=himangi774@gmail$(echo .)com \
    --cc=jslaby@suse$(echo .)cz \
    --cc=julia.lawall@lip6$(echo .)fr \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox