]> git.baikalelectronics.ru Git - kernel.git/commit
staging: dgnc: Remove unnecessary dgnc_Major_Control_Registered variable
authorKonrad Zapalowicz <bergo.torino@gmail.com>
Sat, 16 Aug 2014 14:58:08 +0000 (16:58 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 17 Aug 2014 16:52:25 +0000 (09:52 -0700)
commita292f919f87ad793e6c08158dd7a0606c05f1027
treeb9febcf3a261e37f885434292d0899047f6ddf2e
parentc6300fa71555eb76837d9eff946f5e0adf78881f
staging: dgnc: Remove unnecessary dgnc_Major_Control_Registered variable

The dgnc_Major_Control_Registered variable purpose was to act as a flag
to indicate if the character device has been successfully registered
into the kernel. This flag was later checked in the module cleanup
function to know if the character device needs to be deregistered.

However the {device,class}_destroy and unregister_chrdev functions may
be called with 'invalid' data perfectly fine. This means that this
variable is not needed and can safely be removed which is what this
commit does.

Signed-off-by: Konrad Zapalowicz <bergo.torino@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/dgnc/dgnc_driver.c