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