Skip to contentSkip to conversation

regmap: Fix return code for stub regmap_get_device()

PATCH New Mark Brown 1 participant 1 message Jul 25, 2014 Register map abstraction

lore
Share & tools
lore

Mark Brown

author maintainer
#0 lore raw

PATCH 1/1 regmap: Fix return code for stub regmap_get_device()

From: Mark Brown <[email protected]>

We return a pointer, not an int.

---
 include/linux/regmap.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/regmap.h +1 -1
index cd480fd59795..c5ed83f49c4e 100644
@@ -733,7 +733,7 @@ static inline struct regmap *dev_get_regmap(struct device *dev,
 static inline struct device *regmap_get_device(struct regmap *map)
 {
 	WARN_ONCE(1, "regmap API is disabled");
-	return -EINVAL;
+	return NULL;
 }
 
 #endif
Signature · 1 line
2.0.1