diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2008-09-03 10:07:50 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-09-24 18:54:34 -0400 |
commit | 88c59425139c0cd9984ca8f1ef577959326446d3 (patch) | |
tree | 6c59c39939f4ecb4e86c3d9f7ba40e0923aee6ba /drivers/net/sfc | |
parent | da8de3929da9396977b3c9096f36b173f3d9085a (diff) |
sfc: Add check for memory allocation failure in falcon_probe_nic()
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/sfc')
-rw-r--r-- | drivers/net/sfc/falcon.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/sfc/falcon.c b/drivers/net/sfc/falcon.c index e0c0b23f94ef..636fe824b863 100644 --- a/drivers/net/sfc/falcon.c +++ b/drivers/net/sfc/falcon.c | |||
@@ -2758,6 +2758,8 @@ int falcon_probe_nic(struct efx_nic *efx) | |||
2758 | 2758 | ||
2759 | /* Allocate storage for hardware specific data */ | 2759 | /* Allocate storage for hardware specific data */ |
2760 | nic_data = kzalloc(sizeof(*nic_data), GFP_KERNEL); | 2760 | nic_data = kzalloc(sizeof(*nic_data), GFP_KERNEL); |
2761 | if (!nic_data) | ||
2762 | return -ENOMEM; | ||
2761 | efx->nic_data = nic_data; | 2763 | efx->nic_data = nic_data; |
2762 | 2764 | ||
2763 | /* Determine number of ports etc. */ | 2765 | /* Determine number of ports etc. */ |