fsl/fman: fix a leak in tgec_free()
commit1f1e70efe53c01844ce76d77c3383c2bcb6beb49
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 24 Nov 2016 11:20:43 +0000 (24 14:20 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 26 Nov 2016 01:29:48 +0000 (25 20:29 -0500)
treea75299efb444c275514d8853c9c88b8853b4e261
parent8006f6bf5e39f11c697f48df20382b81d2f2f8b8
fsl/fman: fix a leak in tgec_free()

We set "tgec->cfg" to NULL before passing it to kfree().  There is no
need to set it to NULL at all.  Let's just delete it.

Fixes: 57ba4c9b56d8 ("fsl/fman: Add FMan MAC support")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/fman/fman_tgec.c