summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/fsl-dcu
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@nxp.com>2016-12-28 19:48:47 +0300
committerStefan Agner <stefan@agner.ch>2017-02-08 07:26:49 +0300
commit5d2883d51d60ce34a773d4a07b468216109d9030 (patch)
tree78ef38fa22ba9bafeca9da7d7f468a6fc78b774f /drivers/gpu/drm/fsl-dcu
parent4eaa39c63caf535dc1a8cc43b9a8677a100c09e1 (diff)
downloadlinux-5d2883d51d60ce34a773d4a07b468216109d9030.tar.xz
drm/fsl-dcu: remove unneeded 'ret' assignment
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>
Diffstat (limited to 'drivers/gpu/drm/fsl-dcu')
-rw-r--r--drivers/gpu/drm/fsl-dcu/fsl_tcon.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/fsl-dcu/fsl_tcon.c b/drivers/gpu/drm/fsl-dcu/fsl_tcon.c
index 3194e544ee27..2fbb7eedb066 100644
--- a/drivers/gpu/drm/fsl-dcu/fsl_tcon.c
+++ b/drivers/gpu/drm/fsl-dcu/fsl_tcon.c
@@ -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) {