File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -131,8 +131,11 @@ int amg88xx_trigger_set(struct device *dev,
131131 struct amg88xx_data * drv_data = dev -> driver_data ;
132132 const struct amg88xx_config * config = dev -> config -> config_info ;
133133
134- i2c_reg_write_byte (drv_data -> i2c , config -> i2c_address ,
135- AMG88XX_INTC , AMG88XX_INTC_DISABLED );
134+ if (i2c_reg_write_byte (drv_data -> i2c , config -> i2c_address ,
135+ AMG88XX_INTC , AMG88XX_INTC_DISABLED )) {
136+ return - EIO ;
137+ }
138+
136139 gpio_pin_disable_callback (drv_data -> gpio , config -> gpio_pin );
137140
138141 if (trig -> type == SENSOR_TRIG_THRESHOLD ) {
@@ -144,8 +147,12 @@ int amg88xx_trigger_set(struct device *dev,
144147 }
145148
146149 gpio_pin_enable_callback (drv_data -> gpio , config -> gpio_pin );
147- i2c_reg_write_byte (drv_data -> i2c , config -> i2c_address ,
148- AMG88XX_INTC , AMG88XX_INTC_ABS_MODE );
150+
151+ if (i2c_reg_write_byte (drv_data -> i2c , config -> i2c_address ,
152+ AMG88XX_INTC , AMG88XX_INTC_ABS_MODE )) {
153+ return - EIO ;
154+ }
155+
149156 return 0 ;
150157}
151158
You can’t perform that action at this time.
0 commit comments