caif: add error handling for allocation
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 20 Sep 2011 21:21:59 +0000 (21:21 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 3 Oct 2011 17:45:49 +0000 (13:45 -0400)
commit5bb20ed863f8573ecd1956f0ebd2c3d36e6e0585
tree45591d04c0dd9f8134c100bdfc86f96869059718
parent64af1bac9b979ae1f2f052742fda06d65f497643
caif: add error handling for allocation

The allocation of "phyinfo" wasn't checked, and also the allocation
wasn't freed on error paths.  Sjur Brændeland pointed out as well
that "phy_driver" should be freed on the error path too.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/caif/cfcnfg.c