[PATCH v3 3/6] syscon: Do not return NULL when driver is not selected

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Both syscon_base_lookup_by_pdevname() and
syscon_base_lookup_by_phandle(), when implemented, do not return NULL,
so none of the code using those function is written to check for that.

Change returns to ERR_PTR(-ENOSYS), to avoid having that problem.

Signed-off-by: Andrey Smirnov <andrew.smirnov@xxxxxxxxx>
---
 include/mfd/syscon.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/mfd/syscon.h b/include/mfd/syscon.h
index 2044520..651d4c2 100644
--- a/include/mfd/syscon.h
+++ b/include/mfd/syscon.h
@@ -21,13 +21,13 @@ void __iomem *syscon_base_lookup_by_phandle
 #else
 static inline void __iomem *syscon_base_lookup_by_pdevname(const char *s)
 {
-	return NULL;
+	return ERR_PTR(-ENOSYS);
 }
 
 static inline void __iomem *syscon_base_lookup_by_phandle
 	(struct device_node *np, const char *property)
 {
-	return NULL;
+	return ERR_PTR(-ENOSYS);
 }
 #endif
 
-- 
2.5.5


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux