mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
iio: adc: rockchip_saradc: fix crash cause by saradc
fix the crash caused by interrupt occurring before info->last_chan is ready Change-Id: I6a57d49d5af6fb35708e009c33422ad936af0d3f Signed-off-by: Simon Xue <xxm@rock-chips.com>
This commit is contained in:
@@ -229,6 +229,10 @@ static irqreturn_t rockchip_saradc_isr(int irq, void *dev_id)
|
||||
unsigned long flags;
|
||||
#endif
|
||||
|
||||
/* Nothing need to do if info->last_chan not ready */
|
||||
if (!info->last_chan)
|
||||
return IRQ_HANDLED;
|
||||
|
||||
/* Read value */
|
||||
info->last_val = rockchip_saradc_read(info);
|
||||
#ifndef CONFIG_ROCKCHIP_SARADC_TEST_CHN
|
||||
|
||||
Reference in New Issue
Block a user