]> git.sur5r.net Git - u-boot/blobdiff - drivers/pinctrl/pinctrl-uclass.c
lpi2c: Fix bus stop problem in xfer
[u-boot] / drivers / pinctrl / pinctrl-uclass.c
index a0a326a142f0aeb2ed06c5f8c61702e8b1927733..c38bb212ed74bd74c0f7a3f7194fa1f7b7f24546 100644 (file)
@@ -1,7 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright (C) 2015  Masahiro Yamada <yamada.masahiro@socionext.com>
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -199,6 +198,12 @@ static int pinctrl_select_state_simple(struct udevice *dev)
 
 int pinctrl_select_state(struct udevice *dev, const char *statename)
 {
+       /*
+        * Some device which is logical like mmc.blk, do not have
+        * a valid ofnode.
+        */
+       if (!ofnode_valid(dev->node))
+               return 0;
        /*
         * Try full-implemented pinctrl first.
         * If it fails or is not implemented, try simple one.