From f99b17ada10cba841a6da149bf8d5668e0c946ce Mon Sep 17 00:00:00 2001 From: patrick Date: Sun, 10 Jul 2016 20:53:04 +0000 Subject: [PATCH] Not all i.MX6 devices have a pinctrl property in their device nodes. In that case, soft fail and return instead of allocating buffer with a bogus size. ok kettenis@ --- sys/arch/armv7/imx/imxiomuxc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/arch/armv7/imx/imxiomuxc.c b/sys/arch/armv7/imx/imxiomuxc.c index 5a930db4758..ae41029a700 100644 --- a/sys/arch/armv7/imx/imxiomuxc.c +++ b/sys/arch/armv7/imx/imxiomuxc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: imxiomuxc.c,v 1.4 2016/07/10 17:17:22 kettenis Exp $ */ +/* $OpenBSD: imxiomuxc.c,v 1.5 2016/07/10 20:53:04 patrick Exp $ */ /* * Copyright (c) 2013 Patrick Wildt * Copyright (c) 2016 Mark Kettenis @@ -172,7 +172,7 @@ imxiomuxc_pinctrlbyname(int node, const char *config) len = OF_getproplen(node, "pinctrl-names"); if (len <= 0) - printf("no pinctrl-names\n"); + return -1; names = malloc(len, M_TEMP, M_WAITOK); OF_getprop(node, "pinctrl-names", names, len); -- 2.20.1