提交 226327b2 编写于 作者: M Madalin Bucur

fsl/fman: remove wrong free

Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NMadalin Bucur <madalin.bucur@nxp.com>
上级 1df653cf
...@@ -1312,7 +1312,7 @@ int fman_port_config(struct fman_port *port, struct fman_port_params *params) ...@@ -1312,7 +1312,7 @@ int fman_port_config(struct fman_port *port, struct fman_port_params *params)
/* Allocate the FM driver's parameters structure */ /* Allocate the FM driver's parameters structure */
port->cfg = kzalloc(sizeof(*port->cfg), GFP_KERNEL); port->cfg = kzalloc(sizeof(*port->cfg), GFP_KERNEL);
if (!port->cfg) if (!port->cfg)
goto err_params; return -EINVAL;
/* Initialize FM port parameters which will be kept by the driver */ /* Initialize FM port parameters which will be kept by the driver */
port->port_type = port->dts_params.type; port->port_type = port->dts_params.type;
...@@ -1393,8 +1393,6 @@ int fman_port_config(struct fman_port *port, struct fman_port_params *params) ...@@ -1393,8 +1393,6 @@ int fman_port_config(struct fman_port *port, struct fman_port_params *params)
err_port_cfg: err_port_cfg:
kfree(port->cfg); kfree(port->cfg);
err_params:
kfree(port);
return -EINVAL; return -EINVAL;
} }
EXPORT_SYMBOL(fman_port_config); EXPORT_SYMBOL(fman_port_config);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册