[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1486391895-9554-7-git-send-email-geert@linux-m68k.org>
Date: Mon, 6 Feb 2017 15:38:08 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Miguel Ojeda Sandonis <miguel.ojeda.sandonis@...il.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Willy Tarreau <willy@...roxy.com>,
Ksenija Stanojevic <ksenija.stanojevic@...il.com>,
Arnd Bergmann <arnd@...db.de>
Cc: linux-kernel@...r.kernel.org,
Geert Uytterhoeven <geert@...ux-m68k.org>
Subject: [PATCH 06/13] 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@...ux-m68k.org>
---
drivers/misc/panel.c | 30 ++++++++++++++----------------
1 file changed, 14 insertions(+), 16 deletions(-)
diff --git a/drivers/misc/panel.c b/drivers/misc/panel.c
index 8af500ecaaaf6634..ed19b3e399b08d1f 100644
--- a/drivers/misc/panel.c
+++ b/drivers/misc/panel.c
@@ -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;
- }
+ if (keypad.enabled) {
+ misc_deregister(&keypad_dev);
+ keypad_initialized = 0;
+ }
- /* TODO: free all input signals */
- parport_release(pprt);
- parport_unregister_device(pprt);
- pprt = NULL;
- unregister_reboot_notifier(&panel_notifier);
+ 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 = {
--
1.9.1
Powered by blists - more mailing lists