diff options
author | Javier Martinez Canillas <javier@osg.samsung.com> | 2016-05-27 14:18:22 (GMT) |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2016-06-16 15:05:09 (GMT) |
commit | 5e94913f676af0dddeb6e0f3de241de5bd92f3f1 (patch) | |
tree | 5d35933b7b4e8b7908bc9b18099201e53fdf9f0a | |
parent | 806dd220340d404857c2f1b8f4bd9f9f1f052d80 (diff) | |
download | linux-5e94913f676af0dddeb6e0f3de241de5bd92f3f1.tar.xz |
mwifiex: use better message and error code when OF node doesn't match
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>
Reviewed-by: Julian Calaby <julian.calaby@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
-rw-r--r-- | drivers/net/wireless/marvell/mwifiex/sdio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/marvell/mwifiex/sdio.c b/drivers/net/wireless/marvell/mwifiex/sdio.c index ba7a493..3a2267a 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; |