mirror of
https://github.com/torvalds/linux.git
synced 2024-12-16 16:12:52 +00:00
IB/ipoib: remove the unnecessary memory free
In the function ipoib_cm_nonsrq_init_rx, the memory is not allocated successfully. It is not necessary to free it. CC: Joe Jin <joe.jin@oracle.com> CC: Junxiao Bi <junxiao.bi@oracle.com> Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com> Reviewed-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:
parent
f50cccdd03
commit
c5e8f57b0b
@ -363,7 +363,7 @@ static int ipoib_cm_nonsrq_init_rx(struct net_device *dev, struct ib_cm_id *cm_i
|
|||||||
t = kmalloc(sizeof *t, GFP_KERNEL);
|
t = kmalloc(sizeof *t, GFP_KERNEL);
|
||||||
if (!t) {
|
if (!t) {
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
goto err_free;
|
goto err_free_1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ipoib_cm_init_rx_wr(dev, &t->wr, t->sge);
|
ipoib_cm_init_rx_wr(dev, &t->wr, t->sge);
|
||||||
@ -410,6 +410,8 @@ err_count:
|
|||||||
|
|
||||||
err_free:
|
err_free:
|
||||||
kfree(t);
|
kfree(t);
|
||||||
|
|
||||||
|
err_free_1:
|
||||||
ipoib_cm_free_rx_ring(dev, rx->rx_ring);
|
ipoib_cm_free_rx_ring(dev, rx->rx_ring);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
Reference in New Issue
Block a user