From: Fabio Estevam Date: Wed, 28 Dec 2016 16:48:47 +0000 (-0200) Subject: drm/fsl-dcu: remove unneeded 'ret' assignment X-Git-Tag: v5.15~11808^2~20^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5d2883d51d60ce34a773d4a07b468216109d9030;p=platform%2Fkernel%2Flinux-starfive.git 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 Reviewed-by: Gabriel Krisman Bertazi Signed-off-by: Stefan Agner --- diff --git a/drivers/gpu/drm/fsl-dcu/fsl_tcon.c b/drivers/gpu/drm/fsl-dcu/fsl_tcon.c index 3194e54..2fbb7ee 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) {