mwifiex: use better message and error code when OF node doesn't match
authorJavier Martinez Canillas <javier@osg.samsung.com>
Fri, 27 May 2016 14:18:22 +0000 (10:18 -0400)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 16 Jun 2016 15:05:09 +0000 (18:05 +0300)
commit5e94913f676af0dddeb6e0f3de241de5bd92f3f1
tree5d35933b7b4e8b7908bc9b18099201e53fdf9f0a
parent806dd220340d404857c2f1b8f4bd9f9f1f052d80
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>
drivers/net/wireless/marvell/mwifiex/sdio.c