Do not access NV device if not present
Prevents NULL pointer dereference on pang10 when removing module.
This commit is contained in:
parent
0ca551be36
commit
abf92e78e3
|
|
@ -162,6 +162,9 @@ static int __init nv_hda_init(struct device *dev) {
|
|||
}
|
||||
|
||||
static void __exit nv_hda_exit(void) {
|
||||
if (dis_dev == NULL)
|
||||
return;
|
||||
|
||||
dis_dev_get();
|
||||
|
||||
nv_hda_off();
|
||||
|
|
|
|||
Loading…
Reference in New Issue