question about hvc_opal.c
Himangi Saraogi
himangi774 at gmail.com
Sat May 17 04:04:13 EST 2014
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20140516/985b0b7e/attachment.html>
More information about the Linuxppc-dev
mailing list