drm/fsl-dcu: remove unneeded 'ret' assignment
authorFabio Estevam <fabio.estevam@nxp.com>
Wed, 28 Dec 2016 16:48:47 +0000 (14:48 -0200)
committerStefan Agner <stefan@agner.ch>
Wed, 8 Feb 2017 04:26:49 +0000 (20:26 -0800)
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>
drivers/gpu/drm/fsl-dcu/fsl_tcon.c

index 3194e544ee27b902c4a300d2972781a832d54997..2fbb7eedb0664b6a9fce4c50936cab0ad309dc6e 100644 (file)
@@ -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) {