thermal: tsens: Update condition in critical_irq

Device crash is observed when the critical_irq is triggered because of
accessing uninitialized completion variable.

Update condition in critical_irq such that the completion variable will be
accessed only when initialized.

Change-Id: I0cba089882024bbe36ac4798866af4e33ee02fa2
Signed-off-by: Rama Krishna Phani A <rphani@codeaurora.org>
This commit is contained in:
Rama Krishna Phani A 2016-01-25 16:12:42 +05:30 committed by David Keitel
parent 61811e0792
commit 338086ed12

View file

@ -2447,8 +2447,8 @@ static irqreturn_t tsens_tm_critical_irq_thread(int irq, void *data)
tm->crit_timestamp_last_interrupt_handled.time_stmp[idx%10] =
sched_clock();
tm->qtimer_val_last_detection_interrupt = arch_counter_get_cntpct();
complete(&tm->tsens_rslt_completion);
if (tsens_poll_check)
complete(&tm->tsens_rslt_completion);
/* Mask critical interrupt */
mb();