misc: panel: Remove always-true check from panel_detach()

panel_detach() already verified that pptr is a valid pointer.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Geert Uytterhoeven 2017-02-06 15:38:08 +01:00 committed by Greg Kroah-Hartman
parent 9db3cf1ccd
commit 3f77b43965
1 changed files with 15 additions and 17 deletions

View File

@ -2266,24 +2266,22 @@ static void panel_detach(struct parport *port)
if (scan_timer.function)
del_timer_sync(&scan_timer);
if (pprt) {
if (keypad.enabled) {
misc_deregister(&keypad_dev);
keypad_initialized = 0;
}
if (lcd.enabled) {
panel_lcd_print("\x0cLCD driver unloaded.\x1b[Lc\x1b[Lb\x1b[L-");
misc_deregister(&lcd_dev);
lcd.initialized = false;
}
/* TODO: free all input signals */
parport_release(pprt);
parport_unregister_device(pprt);
pprt = NULL;
unregister_reboot_notifier(&panel_notifier);
if (keypad.enabled) {
misc_deregister(&keypad_dev);
keypad_initialized = 0;
}
if (lcd.enabled) {
panel_lcd_print("\x0cLCD driver unloaded.\x1b[Lc\x1b[Lb\x1b[L-");
misc_deregister(&lcd_dev);
lcd.initialized = false;
}
/* TODO: free all input signals */
parport_release(pprt);
parport_unregister_device(pprt);
pprt = NULL;
unregister_reboot_notifier(&panel_notifier);
}
static struct parport_driver panel_driver = {