diff options
author | Madalin Bucur <madalin.bucur@nxp.com> | 2017-02-13 17:10:46 +0200 |
---|---|---|
committer | Madalin Bucur <madalin.bucur@nxp.com> | 2017-03-09 08:54:04 +0200 |
commit | 226327b236c97c860fe644a409fc536da53d5a98 (patch) | |
tree | 3129025ae4c7ea83e3d14b0629b463ac92f98747 /drivers/net/ethernet/freescale/fman | |
parent | 1df653cfea251386e8ecd8c9f983caacd965c78e (diff) | |
download | linux-226327b236c97c860fe644a409fc536da53d5a98.tar.bz2 |
fsl/fman: remove wrong free
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
Diffstat (limited to 'drivers/net/ethernet/freescale/fman')
-rw-r--r-- | drivers/net/ethernet/freescale/fman/fman_port.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ethernet/freescale/fman/fman_port.c b/drivers/net/ethernet/freescale/fman/fman_port.c index f314348b3387..57bf44fa16a1 100644 --- a/drivers/net/ethernet/freescale/fman/fman_port.c +++ b/drivers/net/ethernet/freescale/fman/fman_port.c @@ -1312,7 +1312,7 @@ int fman_port_config(struct fman_port *port, struct fman_port_params *params) /* Allocate the FM driver's parameters structure */ port->cfg = kzalloc(sizeof(*port->cfg), GFP_KERNEL); if (!port->cfg) - goto err_params; + return -EINVAL; /* Initialize FM port parameters which will be kept by the driver */ port->port_type = port->dts_params.type; @@ -1393,8 +1393,6 @@ int fman_port_config(struct fman_port *port, struct fman_port_params *params) err_port_cfg: kfree(port->cfg); -err_params: - kfree(port); return -EINVAL; } EXPORT_SYMBOL(fman_port_config); |