artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b62da5e
)
Not all i.MX6 devices have a pinctrl property in their device nodes.
author
patrick
<patrick@openbsd.org>
Sun, 10 Jul 2016 20:53:04 +0000
(20:53 +0000)
committer
patrick
<patrick@openbsd.org>
Sun, 10 Jul 2016 20:53:04 +0000
(20:53 +0000)
In that case, soft fail and return instead of allocating buffer with
a bogus size.
ok kettenis@
sys/arch/armv7/imx/imxiomuxc.c
patch
|
blob
|
history
diff --git
a/sys/arch/armv7/imx/imxiomuxc.c
b/sys/arch/armv7/imx/imxiomuxc.c
index
5a930db
..
ae41029
100644
(file)
--- 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 <patrick@blueri.se>
* Copyright (c) 2016 Mark Kettenis <kettenis@openbsd.org>
@@
-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);