mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-03 09:16:43 +07:00
[SPARC64]: Unconditionally register vio_bus_type.
The VIO drivers register themselves unconditionally just like those of any other bus type, so to avoid crashes on non-VIO systems we need to always register vio_bus_type. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
4f0234f4f9
commit
f8be339c02
@ -335,6 +335,13 @@ static int __init vio_init(void)
|
||||
int err, len;
|
||||
u64 root;
|
||||
|
||||
err = bus_register(&vio_bus_type);
|
||||
if (err) {
|
||||
printk(KERN_ERR "VIO: Could not register bus type err=%d\n",
|
||||
err);
|
||||
return err;
|
||||
}
|
||||
|
||||
hp = mdesc_grab();
|
||||
if (!hp)
|
||||
return 0;
|
||||
@ -374,13 +381,6 @@ static int __init vio_init(void)
|
||||
|
||||
cdev_cfg_handle = *cfg_handle;
|
||||
|
||||
err = bus_register(&vio_bus_type);
|
||||
if (err) {
|
||||
printk(KERN_ERR "VIO: Could not register bus type err=%d\n",
|
||||
err);
|
||||
return err;
|
||||
}
|
||||
|
||||
create_devices(hp, root);
|
||||
|
||||
mdesc_release(hp);
|
||||
|
Loading…
Reference in New Issue
Block a user