aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2013-09-04 11:07:27 -0400
committerDavid S. Miller <davem@davemloft.net>2013-09-04 13:07:47 -0400
commit42a5a5c128ad33fe25867b838a4dade127b57aee (patch)
treea5ce987b878e45afdda83e84a7670fe9b7d929f9 /drivers/net/ethernet/sfc
parentb163b42fd230ef81eae09a6fe493a33ce17b8f86 (diff)
sfc: check for allocation failure
It upsets static analyzers when we don't check for allocation failure. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sfc')
-rw-r--r--drivers/net/ethernet/sfc/falcon.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/sfc/falcon.c b/drivers/net/ethernet/sfc/falcon.c
index 8685f99d872a..ff5d322b9b49 100644
--- a/drivers/net/ethernet/sfc/falcon.c
+++ b/drivers/net/ethernet/sfc/falcon.c
@@ -893,6 +893,8 @@ static int falcon_mtd_probe(struct efx_nic *efx)
893 893
894 /* Allocate space for maximum number of partitions */ 894 /* Allocate space for maximum number of partitions */
895 parts = kcalloc(2, sizeof(*parts), GFP_KERNEL); 895 parts = kcalloc(2, sizeof(*parts), GFP_KERNEL);
896 if (!parts)
897 return -ENOMEM;
896 n_parts = 0; 898 n_parts = 0;
897 899
898 spi = &nic_data->spi_flash; 900 spi = &nic_data->spi_flash;