projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
424a646
)
net: korina: cast KSEG0 address to pointer in kfree
author
Valentin Vidic
<vvidic@valentin-vidic.from.hr>
Sun, 18 Oct 2020 18:42:55 +0000
(20:42 +0200)
committer
Jakub Kicinski
<kuba@kernel.org>
Tue, 20 Oct 2020 00:00:00 +0000
(17:00 -0700)
Fixes gcc warning:
passing argument 1 of 'kfree' makes pointer from integer without a cast
Fixes:
3af5f0f5c74e
("net: korina: fix kfree of rx/tx descriptor array")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Valentin Vidic <vvidic@valentin-vidic.from.hr>
Link:
https://lore.kernel.org/r/20201018184255.28989-1-vvidic@valentin-vidic.from.hr
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/korina.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/korina.c
b/drivers/net/ethernet/korina.c
index
af441d6
..
bf48f0d
100644
(file)
--- a/
drivers/net/ethernet/korina.c
+++ b/
drivers/net/ethernet/korina.c
@@
-1113,7
+1113,7
@@
out:
return rc;
probe_err_register:
- kfree(KSEG0ADDR(lp->td_ring));
+ kfree(
(struct dma_desc *)
KSEG0ADDR(lp->td_ring));
probe_err_td_ring:
iounmap(lp->tx_dma_regs);
probe_err_dma_tx:
@@
-1133,7
+1133,7
@@
static int korina_remove(struct platform_device *pdev)
iounmap(lp->eth_regs);
iounmap(lp->rx_dma_regs);
iounmap(lp->tx_dma_regs);
- kfree(KSEG0ADDR(lp->td_ring));
+ kfree(
(struct dma_desc *)
KSEG0ADDR(lp->td_ring));
unregister_netdev(bif->dev);
free_netdev(bif->dev);