diff options
| author | CYFS <[email protected]> | 2025-03-01 14:47:26 +0800 |
|---|---|---|
| committer | Rbb666 <[email protected]> | 2025-03-01 15:39:02 +0800 |
| commit | 84b5b2f408117b835c62f34dcacdaf9b4fc9ea24 (patch) | |
| tree | ff9f353e774d3f8e9ec260867e7bafd6d4df9bca | |
| parent | fbb65196a72070c93a1bc4981ad3347bb73c4d90 (diff) | |
fix:pwm msh err
| -rw-r--r-- | components/drivers/misc/rt_drv_pwm.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/components/drivers/misc/rt_drv_pwm.c b/components/drivers/misc/rt_drv_pwm.c index 3f2086f362..5c59b4fc69 100644 --- a/components/drivers/misc/rt_drv_pwm.c +++ b/components/drivers/misc/rt_drv_pwm.c @@ -331,10 +331,12 @@ static int pwm_list(int argc, char **argv) pwm_device = (struct rt_device_pwm *)rt_device_find(argv[2]); result_str = (pwm_device == RT_NULL) ? "failure" : "success"; rt_kprintf("probe %s %s\n", argv[2], result_str); + return (pwm_device == RT_NULL) ? -RT_ERROR : RT_EOK; } else { rt_kprintf("pwm probe <device name> - probe pwm by name\n"); + return -RT_EINVAL; } } else if (pwm_device == RT_NULL) |
