diff mbox series

Input: da7280 - fix missing error test

Message ID X9j8lGFgijzHyYZZ@google.com (mailing list archive)
State Accepted
Commit 1e2020aa0da00051d94c4690c023c45d8f3834bd
Headers show
Series Input: da7280 - fix missing error test | expand

Commit Message

Dmitry Torokhov Dec. 15, 2020, 6:12 p.m. UTC
An "if" testing for error condition has accidentally been dropped from
the code.

Reported-by: kernel test robot <lkp@intel.com>
Fixes: cd3f609823a5 ("Input: new da7280 haptic driver")
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
 drivers/input/misc/da7280.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Roy Im Dec. 16, 2020, 1:14 a.m. UTC | #1
On Wednesday, December 16, 2020 3:13 AM, Dmitry Torokhov wrote:

> An "if" testing for error condition has accidentally been dropped from the code.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Fixes: cd3f609823a5 ("Input: new da7280 haptic driver")
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> ---

Many thanks for your help.

Reviewed-by: Roy Im <Roy.Im.Opensource@diasemi.com>
diff mbox series

Patch

diff --git a/drivers/input/misc/da7280.c b/drivers/input/misc/da7280.c
index 37568b00873d..2f698a8c1d65 100644
--- a/drivers/input/misc/da7280.c
+++ b/drivers/input/misc/da7280.c
@@ -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);
 	}