From: Greg KH <gregkh@linuxfoundation.org>
To: Himangi Saraogi <himangi774@gmail.com>
Cc: jslaby@suse.cz, linuxppc-dev@lists.ozlabs.org,
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.
parent reply other threads:[~2014-05-16 18:23 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <CAB78YHynbQ=cR-jDTHpwwVGgDO24fjXETO1Zp88QD=Vkjf+6GQ@mail.gmail.com>]
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.org \
--cc=himangi774@gmail.com \
--cc=jslaby@suse.cz \
--cc=julia.lawall@lip6.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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