Skip to content

Commit

Permalink
drm/fsl-dcu: remove unneeded 'ret' assignment
Browse files Browse the repository at this point in the history
When devm_kzalloc() fails there is no need to assign an error code
to the 'ret' variable as it will not be used after jumping to the
'err_node_put' label, so just remove the assignment.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk>
Signed-off-by: Stefan Agner <stefan@agner.ch>
  • Loading branch information
Fabio Estevam authored and Stefan Agner committed Feb 8, 2017
1 parent 4eaa39c commit 5d2883d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/gpu/drm/fsl-dcu/fsl_tcon.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,8 @@ struct fsl_tcon *fsl_tcon_init(struct device *dev)
return NULL;

tcon = devm_kzalloc(dev, sizeof(*tcon), GFP_KERNEL);
if (!tcon) {
ret = -ENOMEM;
if (!tcon)
goto err_node_put;
}

ret = fsl_tcon_init_regmap(dev, tcon, np);
if (ret) {
Expand Down

0 comments on commit 5d2883d

Please sign in to comment.