Fix use of unitialized variables.

This commit is contained in:
nwhitehorn 2018-03-06 15:52:43 +00:00
parent 9d45d000b2
commit af59ead0bb
2 changed files with 3 additions and 2 deletions

View File

@ -429,6 +429,7 @@ opalpci_read_config(device_t dev, u_int bus, u_int slot, u_int func, u_int reg,
config_addr, reg, vtophys(&word));
break;
default:
error = OPAL_SUCCESS;
word = 0xffffffff;
}

View File

@ -127,7 +127,7 @@ powernv_attach(platform_t plat)
char buf[255];
pcell_t prop;
phandle_t cpu;
int res, len, node, idx;
int res, len, idx;
register_t msr;
/* Ping OPAL again just to make sure */
@ -194,7 +194,7 @@ powernv_attach(platform_t plat)
* for the encoding of the property.
*/
len = OF_getproplen(node, "ibm,segment-page-sizes");
len = OF_getproplen(cpu, "ibm,segment-page-sizes");
if (len > 0) {
/*
* We have to use a variable length array on the stack