Skip to contentSkip to conversation

Input: da7280 - fix missing error test

PATCH In review Dmitry Torokhov 2 participants 2 messages Dec 15, 2020 – Dec 16, 2020

Subsystems (3)
lore
Share & tools
lore

Dmitry Torokhov

author maintainer
#0 lore raw

PATCH 1/1 Input: da7280 - fix missing error test

An "if" testing for error condition has accidentally been dropped from the code.

Fixes cd3f609823a5 ("Input: new da7280 haptic driver")
---
 drivers/input/misc/da7280.c | 1 +
 1 file changed, 1 insertion(+)
drivers/input/misc/da7280.c +1 -0
index 37568b00873d..2f698a8c1d65 100644
@@ -863,6 +863,7 @@ static void da7280_parse_properties(struct device *dev,
 		gpi_str3[7] = '0' + i;
 		haptics->gpi_ctl[i].polarity = 0;
 		error = device_property_read_string(dev, gpi_str3, &str);
+		if (!error)
 			haptics->gpi_ctl[i].polarity =
 				da7280_haptic_of_gpi_pol_str(dev, str);
 	}
Signature · 5 lines
2.29.2.684.gfbc64c5ab5-goog


-- 
Dmitry