[SPARC64]: Missing mdesc_release() in ldc_init().
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
e3c0ac04f9
commit
6fab2600f9
|
@ -2338,6 +2338,7 @@ static int __init ldc_init(void)
|
||||||
unsigned long major, minor;
|
unsigned long major, minor;
|
||||||
struct mdesc_handle *hp;
|
struct mdesc_handle *hp;
|
||||||
const u64 *v;
|
const u64 *v;
|
||||||
|
int err;
|
||||||
u64 mp;
|
u64 mp;
|
||||||
|
|
||||||
hp = mdesc_grab();
|
hp = mdesc_grab();
|
||||||
|
@ -2345,29 +2346,33 @@ static int __init ldc_init(void)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
mp = mdesc_node_by_name(hp, MDESC_NODE_NULL, "platform");
|
mp = mdesc_node_by_name(hp, MDESC_NODE_NULL, "platform");
|
||||||
|
err = -ENODEV;
|
||||||
if (mp == MDESC_NODE_NULL)
|
if (mp == MDESC_NODE_NULL)
|
||||||
return -ENODEV;
|
goto out;
|
||||||
|
|
||||||
v = mdesc_get_property(hp, mp, "domaining-enabled", NULL);
|
v = mdesc_get_property(hp, mp, "domaining-enabled", NULL);
|
||||||
if (!v)
|
if (!v)
|
||||||
return -ENODEV;
|
goto out;
|
||||||
|
|
||||||
major = 1;
|
major = 1;
|
||||||
minor = 0;
|
minor = 0;
|
||||||
if (sun4v_hvapi_register(HV_GRP_LDOM, major, &minor)) {
|
if (sun4v_hvapi_register(HV_GRP_LDOM, major, &minor)) {
|
||||||
printk(KERN_INFO PFX "Could not register LDOM hvapi.\n");
|
printk(KERN_INFO PFX "Could not register LDOM hvapi.\n");
|
||||||
return -ENODEV;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
printk(KERN_INFO "%s", version);
|
printk(KERN_INFO "%s", version);
|
||||||
|
|
||||||
if (!*v) {
|
if (!*v) {
|
||||||
printk(KERN_INFO PFX "Domaining disabled.\n");
|
printk(KERN_INFO PFX "Domaining disabled.\n");
|
||||||
return -ENODEV;
|
goto out;
|
||||||
}
|
}
|
||||||
ldom_domaining_enabled = 1;
|
ldom_domaining_enabled = 1;
|
||||||
|
err = 0;
|
||||||
|
|
||||||
return 0;
|
out:
|
||||||
|
mdesc_release(hp);
|
||||||
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
core_initcall(ldc_init);
|
core_initcall(ldc_init);
|
||||||
|
|
Loading…
Reference in New Issue