From: Andrey Smirnov <andrew.smirnov@gmail.com>
To: barebox@lists.infradead.org
Cc: Andrey Smirnov <andrew.smirnov@gmail.com>
Subject: [PATCH v3 3/6] syscon: Do not return NULL when driver is not selected
Date: Mon, 16 May 2016 09:45:58 -0700 [thread overview]
Message-ID: <1463417161-28634-4-git-send-email-andrew.smirnov@gmail.com> (raw)
In-Reply-To: <1463417161-28634-1-git-send-email-andrew.smirnov@gmail.com>
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@gmail.com>
---
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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2016-05-16 16:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-16 16:45 [PATCH v3 0/6] AIODEV subsystem Andrey Smirnov
2016-05-16 16:45 ` [PATCH v3 1/6] drivers: Introduce " Andrey Smirnov
2016-05-16 16:45 ` [PATCH v3 2/6] commands: Add 'hwmon' command Andrey Smirnov
2016-05-16 16:45 ` Andrey Smirnov [this message]
2016-05-16 16:45 ` [PATCH v3 4/6] syscon: Decrease driver registration priority Andrey Smirnov
2016-05-16 16:46 ` [PATCH v3 5/6] aiodev: Add TEMPMON driver Andrey Smirnov
2016-05-16 16:46 ` [PATCH v3 6/6] aiodev: Add basic LM75 temperature driver Andrey Smirnov
2016-05-18 5:49 ` [PATCH v3 0/6] AIODEV subsystem Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1463417161-28634-4-git-send-email-andrew.smirnov@gmail.com \
--to=andrew.smirnov@gmail.com \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox