Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit df1868e4 authored by Jarod Wilson's avatar Jarod Wilson Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB: IR/lirc_dev: check for valid irctl in unregister path



Prompted by Red Hat bugzilla #633023

Signed-off-by: default avatarJarod Wilson <jarod@redhat.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 04292fc0
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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);