[PATCH 13/15] aiodev: lm75: Handle unknown lm75 types

Sascha Hauer s.hauer at pengutronix.de
Mon May 17 11:54:22 PDT 2021


lm75 type unknown is not handled in the switch/case handling all types.
Handle it to avoid compiler warnings.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 drivers/aiodev/lm75.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/aiodev/lm75.c b/drivers/aiodev/lm75.c
index 8e5948f468..1900636555 100644
--- a/drivers/aiodev/lm75.c
+++ b/drivers/aiodev/lm75.c
@@ -182,6 +182,8 @@ static int lm75_probe(struct device_d *dev)
 		clr_mask |= 1 << 5;		/* not one-shot mode */
 		data->resolution = 12;
 		break;
+	default:
+		return -EINVAL;
 	}
 
 	/* configure as specified */
-- 
2.29.2




More information about the barebox mailing list