pwm: Return -ENODEV if no PWM lookup match is found
[deliverable/linux.git] / drivers / pwm / core.c
index b8f6c309c160ace262e50ea5f2513a3673ce69fc..d24ca5f281b4bbd98e5ce86e8f454c270d86fe10 100644 (file)
@@ -738,8 +738,10 @@ struct pwm_device *pwm_get(struct device *dev, const char *con_id)
                }
        }
 
-       if (!chosen)
+       if (!chosen) {
+               pwm = ERR_PTR(-ENODEV);
                goto out;
+       }
 
        chip = pwmchip_find_by_name(chosen->provider);
        if (!chip)
This page took 0.037622 seconds and 5 git commands to generate.