pinctrl: add some error checking for user interfaces

This patch can avoid kernel oops in case the mux or config
function is not supported by driver.

Change-Id: I127693bd11296608b64388abd4b5241021868619
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Dong Aisheng <dong.aisheng@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Git-commit: ad8bb720c23a80233e45ed31d67458f5e5b7ab31
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
2 files changed