hwmon:qpnp-adc: Set adc_drv to NULL on error

Set the adc_drv to NULL during probe error before
we exit. Not setting the adc_drv to NULL can cause
panic on conditions when adc requests are made when
an error occured during probe. Fix it by setting the
adc_drv to NULL since we have checks in the adc read
requests. Also add the adc_drv is valid check in the
work scheduler to ensure against conditions of
receiving an interrupt immediately when a irq_request
is made during probe initialization.

Change-Id: I5d921a67306bb9e401dbe798599c200d9f8eed28
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
3 files changed