Commit 4cd74f1d authored by Art Haas's avatar Art Haas Committed by David S. Miller

[SPARC]:Check prom_getproperty() return value in prom_nodematch().

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 49129844
......@@ -176,8 +176,11 @@ void prom_getstring(int node, char *prop, char *user_buf, int ubuf_size)
*/
int prom_nodematch(int node, char *name)
{
int error;
static char namebuf[128];
prom_getproperty(node, "name", namebuf, sizeof(namebuf));
error = prom_getproperty(node, "name", namebuf, sizeof(namebuf));
if (error == -1) return 0;
if(strcmp(namebuf, name) == 0) return 1;
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment