From b3a144132ec1037cabc19692fcf8452d095c495c Mon Sep 17 00:00:00 2001 From: amarenr Date: Wed, 22 Apr 2020 21:04:01 +0530 Subject: [PATCH] Ensure to initialise the index variable. After enabling CONFIG_INIT_STACK_ALL=Y, kernel crash is observed. [ 5.602434] Call trace: [ 5.602436] dsi_display_bind+0xbec/0xeb0 [ 5.602441] component_bind_all+0x13c/0x298 [ 5.602443] msm_drm_bind+0x154/0x8f8 [ 5.602446] try_to_bring_up_master+0x220/0x290 [ 5.602449] component_add+0xc0/0x1a8 [ 5.602453] dp_display_probe+0x31c/0x428 [ 5.602456] platform_drv_probe+0x80/0xb8 [ 5.602459] really_probe+0x4c0/0x6a8 [ 5.602461] driver_probe_device+0x74/0x148 [ 5.602464] __driver_attach+0x120/0x1d8 [ 5.602466] bus_for_each_dev+0x8c/0xd8 [ 5.602469] driver_attach+0x2c/0x38 [ 5.602471] bus_add_driver+0x144/0x268 [ 5.602474] driver_register+0x78/0x110 [ 5.602476] __platform_driver_register+0x4c/0x58 [ 5.602481] dp_display_init+0x20/0x58 [ 5.602484] do_one_initcall+0x204/0x410 [ 5.602488] kernel_init_freeable+0x46c/0x538 [ 5.602492] kernel_init+0x18/0x298 [ 5.602495] ret_from_fork+0x10/0x1c [ 5.602497] Code: 9136e129 52801002 9b2826e8 91003500 (b900091f) [ 5.602501] ---[ end trace 3dfb83852f204db5 ]--- [ 5.603216] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b This patch shall avoid crash by ensuring to select the default display type as primary. Change-Id: Id70ffafae48214e7514e9bc303909c3294c79ecd Reviewed-on: https://gerrit.mot.com/1540832 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Igor Kovalenko Submit-Approved: Jira Key Reviewed-on: https://gerrit.mot.com/1697632 --- msm/dsi/dsi_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/msm/dsi/dsi_display.c b/msm/dsi/dsi_display.c index 2a051509c22f..d5dbdf629e08 100644 --- a/msm/dsi/dsi_display.c +++ b/msm/dsi/dsi_display.c @@ -8789,7 +8789,7 @@ static void dsi_display_is_probed (struct dsi_display *display, int probe_status) { - int enable_idx; + int enable_idx = 0; if (!display->display_type) enable_idx = 0;