diff options
| author | KE1VG8CBMISQ6ED\Administrator <[email protected]> | 2018-12-08 22:56:34 +0800 |
|---|---|---|
| committer | KE1VG8CBMISQ6ED\Administrator <[email protected]> | 2018-12-08 22:56:34 +0800 |
| commit | 895fb5c1a9618a1cc199f4c806a2ba115b004038 (patch) | |
| tree | ce46cd67f36dda7ca67cf7ae54d282bf8359c890 /components | |
| parent | 506ccc573cf43c337bbd1069f146eabb3cd113dd (diff) | |
Update adc.c
check fun is NULL, error
Diffstat (limited to 'components')
| -rw-r--r-- | components/drivers/misc/adc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/components/drivers/misc/adc.c b/components/drivers/misc/adc.c index aa3a3b7801..83e789a6e4 100644 --- a/components/drivers/misc/adc.c +++ b/components/drivers/misc/adc.c @@ -46,7 +46,7 @@ static rt_err_t _adc_control(rt_device_t dev, int cmd, void *args) rt_err_t result = RT_EOK; rt_adc_device_t adc = (struct rt_adc_device *)dev; - if (adc->ops->enabled != RT_NULL) + if (adc->ops->enabled == RT_NULL) { return -RT_ENOSYS; } |
