Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1408108
| From | Javier Martinez Canillas <javier@osg.samsung.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 8/8] mwifiex: use better message and error code when OF node doesn't match |
| Date | 2016-05-27 16:20 +0200 |
| Message-ID | <rDqMi-4xu-27@gated-at.bofh.it> (permalink) |
| References | <rDqMi-4xu-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
The Documentation/devicetree/bindings/net/wireless/marvell-sd8xxx.txt DT
binding document lists the possible compatible strings that a SDIO child
node can have, so the driver checks if the defined in the node matches.
But the error message when that's not the case is misleading, so change
for one that makes clear what the error really is. Also, returning a -1
as errno code is not correct since that's -EPERM. A -EINVAL seems to be
a more appropriate one.
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
---
drivers/net/wireless/marvell/mwifiex/sdio.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/marvell/mwifiex/sdio.c b/drivers/net/wireless/marvell/mwifiex/sdio.c
index 8b3292eaecb2..e6d56be04e08 100644
--- a/drivers/net/wireless/marvell/mwifiex/sdio.c
+++ b/drivers/net/wireless/marvell/mwifiex/sdio.c
@@ -103,8 +103,8 @@ static int mwifiex_sdio_probe_of(struct device *dev, struct sdio_mmc_card *card)
int ret;
if (!of_match_node(mwifiex_sdio_of_match_table, dev->of_node)) {
- dev_err(dev, "sdio platform data not available\n");
- return -1;
+ dev_err(dev, "required compatible string missing\n");
+ return -EINVAL;
}
card->plt_of_node = dev->of_node;
--
2.5.5
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/8] mwifiex: Fix some error handling issues in mwifiex_sdio_probe() function Javier Martinez Canillas <javier@osg.samsung.com> - 2016-05-27 16:20 +0200 [PATCH 6/8] mwifiex: check if mwifiex_sdio_probe_of() fails and return error Javier Martinez Canillas <javier@osg.samsung.com> - 2016-05-27 16:20 +0200 [PATCH 4/8] mwifiex: consolidate mwifiex_sdio_probe() error paths Javier Martinez Canillas <javier@osg.samsung.com> - 2016-05-27 16:20 +0200 [PATCH 1/8] mwifiex: only call mwifiex_sdio_probe_of() if dev has an OF node Javier Martinez Canillas <javier@osg.samsung.com> - 2016-05-27 16:20 +0200 [PATCH 8/8] mwifiex: use better message and error code when OF node doesn't match Javier Martinez Canillas <javier@osg.samsung.com> - 2016-05-27 16:20 +0200 [PATCH 5/8] mwifiex: use dev_err() instead of pr_err() in mwifiex_sdio_probe() Javier Martinez Canillas <javier@osg.samsung.com> - 2016-05-27 16:20 +0200 [PATCH 7/8] mwifiex: don't print an error if an optional DT property is missing Javier Martinez Canillas <javier@osg.samsung.com> - 2016-05-27 16:30 +0200 Re: [PATCH 0/8] mwifiex: Fix some error handling issues in mwifiex_sdio_probe() function Enric Balletbo Serra <eballetbo@gmail.com> - 2016-05-30 12:00 +0200
csiph-web