* re: net: bcmgenet: add main driver file
@ 2015-02-25 13:34 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2015-02-25 13:34 UTC (permalink / raw)
To: kernel-janitors
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-02-25 13:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-25 13:34 net: bcmgenet: add main driver file Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox