mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-12 14:56:43 +07:00
V4L/DVB: IR/lirc_dev: check for valid irctl in unregister path
Prompted by Red Hat bugzilla #633023 Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
04292fc003
commit
df1868e4ee
@ -366,6 +366,11 @@ int lirc_unregister_driver(int minor)
|
||||
}
|
||||
|
||||
ir = irctls[minor];
|
||||
if (!ir) {
|
||||
printk(KERN_ERR "lirc_dev: lirc_unregister_driver: "
|
||||
"failed to get irctl struct for minor %d!", minor);
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
mutex_lock(&lirc_dev_lock);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user