Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 42a5a5c1 authored by Dan Carpenter's avatar Dan Carpenter Committed by David S. Miller
Browse files

sfc: check for allocation failure



It upsets static analyzers when we don't check for allocation failure.

Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b163b42f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -893,6 +893,8 @@ static int falcon_mtd_probe(struct efx_nic *efx)

	/* Allocate space for maximum number of partitions */
	parts = kcalloc(2, sizeof(*parts), GFP_KERNEL);
	if (!parts)
		return -ENOMEM;
	n_parts = 0;

	spi = &nic_data->spi_flash;