summaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/tenxpress.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2008-05-16 21:20:20 +0100
committerJeff Garzik <jgarzik@redhat.com>2008-05-22 05:59:34 -0400
commit9b7bfc4c4c601a5cb368751f60cac054492c45f5 (patch)
treec5cf9c6c582542ad91e2c0bf0fffab2a6f38ee43 /drivers/net/sfc/tenxpress.c
parentd3208b5ebae9e62c32f0cf74dce1d4ddfac3f895 (diff)
downloadblackbird-op-linux-9b7bfc4c4c601a5cb368751f60cac054492c45f5.tar.gz
blackbird-op-linux-9b7bfc4c4c601a5cb368751f60cac054492c45f5.zip
sfc: Added checks for heap allocation failure
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/sfc/tenxpress.c')
-rw-r--r--drivers/net/sfc/tenxpress.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/sfc/tenxpress.c b/drivers/net/sfc/tenxpress.c
index 38e96ed33d33..c0146061c326 100644
--- a/drivers/net/sfc/tenxpress.c
+++ b/drivers/net/sfc/tenxpress.c
@@ -211,6 +211,8 @@ static int tenxpress_phy_init(struct efx_nic *efx)
int rc = 0;
phy_data = kzalloc(sizeof(*phy_data), GFP_KERNEL);
+ if (!phy_data)
+ return -ENOMEM;
efx->phy_data = phy_data;
tenxpress_set_state(efx, TENXPRESS_STATUS_NORMAL);
OpenPOWER on IntegriCloud