diff options
author | Valentin Vidic <vvidic@valentin-vidic.from.hr> | 2020-10-18 20:42:55 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-10-29 09:03:11 +0100 |
commit | 39c5ebcd8143b1a0908070aec0cb9d789eb66b0b (patch) | |
tree | e6c74526da64b137e982e3653a315a80d979715d | |
parent | 083e298477de31d695cd19f0f40d407b81c034ed (diff) | |
download | linux-stable-39c5ebcd8143b1a0908070aec0cb9d789eb66b0b.tar.gz linux-stable-39c5ebcd8143b1a0908070aec0cb9d789eb66b0b.tar.bz2 linux-stable-39c5ebcd8143b1a0908070aec0cb9d789eb66b0b.zip |
net: korina: cast KSEG0 address to pointer in kfree
[ Upstream commit 3bd57b90554b4bb82dce638e0668ef9dc95d3e96 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | drivers/net/ethernet/korina.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/korina.c b/drivers/net/ethernet/korina.c index 3954c80f70fc..b491de946a0e 100644 --- a/drivers/net/ethernet/korina.c +++ b/drivers/net/ethernet/korina.c @@ -1188,7 +1188,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: @@ -1208,7 +1208,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); |