public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
* question about hvc_opal.c
@ 2014-05-16 18:04 Himangi Saraogi
  2014-05-16 18:26 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Himangi Saraogi @ 2014-05-16 18:04 UTC (permalink / raw)
  To: jslaby, Greg KH, linuxppc-dev, linux-kernel; +Cc: Julia Lawall

[-- Attachment #1: Type: text/plain, Size: 542 bytes --]

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.

Thanks.
Himangi

[-- Attachment #2: Type: text/html, Size: 699 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-05-16 18:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-16 18:04 question about hvc_opal.c Himangi Saraogi
2014-05-16 18:26 ` Greg KH

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