Skip to content

Commit

Permalink
sfc: Add check for memory allocation failure in falcon_probe_nic()
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
  • Loading branch information
Ben Hutchings authored and Jeff Garzik committed Sep 24, 2008
1 parent da8de39 commit 88c5942
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/sfc/falcon.c
Original file line number Diff line number Diff line change
Expand Up @@ -2758,6 +2758,8 @@ int falcon_probe_nic(struct efx_nic *efx)

/* Allocate storage for hardware specific data */
nic_data = kzalloc(sizeof(*nic_data), GFP_KERNEL);
if (!nic_data)
return -ENOMEM;
efx->nic_data = nic_data;

/* Determine number of ports etc. */
Expand Down

0 comments on commit 88c5942

Please sign in to comment.