+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (C) 2015 Masahiro Yamada <yamada.masahiro@socionext.com>
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
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.