[PATCH] drm/tilcdc: uninitialized variable in tilcdc_get_overlay()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The code seems to assume that of_fdt_unflatten_tree() sets "overlay" to
NULL on error but actually it could be uninitialized.

Fixes: 4e7221580223 ("drm/tilcdc: Add DRM_TILCDC_SLAVE_COMPAT for ti,tilcdc,slave binding support")
Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/tilcdc/tilcdc_slave_compat.c b/drivers/gpu/drm/tilcdc/tilcdc_slave_compat.c
index d2b9e5f04724..a8a70b36f0ff 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_slave_compat.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_slave_compat.c
@@ -144,7 +144,7 @@ static struct device_node * __init tilcdc_get_overlay(struct kfree_table *kft)
 	const int size = __dtb_tilcdc_slave_compat_end -
 		__dtb_tilcdc_slave_compat_begin;
 	static void *overlay_data;
-	struct device_node *overlay;
+	struct device_node *overlay = NULL;
 
 	if (!size) {
 		pr_warn("%s: No overlay data\n", __func__);
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux