re: net: bcmgenet: add main driver file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Florian Fainelli,

The patch 1c1008c793fa: "net: bcmgenet: add main driver file" from
Feb 13, 2014, leads to the following static checker warning:

	drivers/net/ethernet/broadcom/genet/bcmgenet.c:1955 bcmgenet_init_dma()
	error: potential null dereference 'priv->tx_cbs'.  (kcalloc returns null)

drivers/net/ethernet/broadcom/genet/bcmgenet.c
  1952          priv->tx_cbs = kcalloc(priv->num_tx_bds, sizeof(struct enet_cb),
  1953                                 GFP_KERNEL);
  1954          if (!priv->tx_cbs) {
  1955                  bcmgenet_fini_dma(priv);
                        ^^^^^^^^^^^^^^^^^^^^^^^
We dereference "priv->tx_cbs" inside the bcmgenet_fini_dma() function.

  1956                  return -ENOMEM;
  1957          }

regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux