Fixes the following warning: drivers/input/misc/max8997_haptic.c:185:19: warning: ignoring return value of ‘regulator_enable’, declared with attribute warn_unused_result [-Wunused-result] Signed-off-by: Sachin Kamat <sachin.kamat@xxxxxxxxxx> Cc: Donggeun Kim <dg77.kim@xxxxxxxxxxx> --- drivers/input/misc/max8997_haptic.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/input/misc/max8997_haptic.c b/drivers/input/misc/max8997_haptic.c index 1fea5484941f..4f4c34e135f5 100644 --- a/drivers/input/misc/max8997_haptic.c +++ b/drivers/input/misc/max8997_haptic.c @@ -182,7 +182,11 @@ static void max8997_haptic_enable(struct max8997_haptic *chip) if (!chip->enabled) { chip->enabled = true; - regulator_enable(chip->regulator); + error = regulator_enable(chip->regulator); + if (error) { + dev_err(chip->dev, "Failed to enable regulator"); + goto out; + } max8997_haptic_configure(chip); if (chip->mode == MAX8997_EXTERNAL_MODE) pwm_enable(chip->pwm); -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html