Skip to content

Commit 3bd57b9

Browse files
vvidickuba-moo
authored andcommitted
net: korina: cast KSEG0 address to pointer in kfree
Fixes gcc warning: passing argument 1 of 'kfree' makes pointer from integer without a cast Fixes: 3af5f0f ("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>
1 parent 424a646 commit 3bd57b9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/ethernet/korina.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,7 +1113,7 @@ static int korina_probe(struct platform_device *pdev)
11131113
return rc;
11141114

11151115
probe_err_register:
1116-
kfree(KSEG0ADDR(lp->td_ring));
1116+
kfree((struct dma_desc *)KSEG0ADDR(lp->td_ring));
11171117
probe_err_td_ring:
11181118
iounmap(lp->tx_dma_regs);
11191119
probe_err_dma_tx:
@@ -1133,7 +1133,7 @@ static int korina_remove(struct platform_device *pdev)
11331133
iounmap(lp->eth_regs);
11341134
iounmap(lp->rx_dma_regs);
11351135
iounmap(lp->tx_dma_regs);
1136-
kfree(KSEG0ADDR(lp->td_ring));
1136+
kfree((struct dma_desc *)KSEG0ADDR(lp->td_ring));
11371137

11381138
unregister_netdev(bif->dev);
11391139
free_netdev(bif->dev);

0 commit comments

Comments
 (0)