mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] auxdisplay: ks0108: initialize local parport variable
@ 2015-08-13 13:36 Sudip Mukherjee
  0 siblings, 0 replies; only message in thread
From: Sudip Mukherjee @ 2015-08-13 13:36 UTC (permalink / raw)
  To: Miguel Ojeda Sandonis, gregkh; +Cc: linux-kernel, fengguang.wu, Sudip Mukherjee

The local variable ks0108_parport is used by other functions to write to
the parallel port. We missed initializing it when we converted the
driver to use new Parallel Port codes.

Fixes: 4edd70c133f3 ("auxdisplay: ks0108: use new parport device model")
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---

Tested on kvm with the script provided by Fengguang Wu to reproduce the
error.

 drivers/auxdisplay/ks0108.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/auxdisplay/ks0108.c b/drivers/auxdisplay/ks0108.c
index 4c471bd..816de9e 100644
--- a/drivers/auxdisplay/ks0108.c
+++ b/drivers/auxdisplay/ks0108.c
@@ -146,6 +146,7 @@ static void ks0108_parport_attach(struct parport *port)
 		goto err_unreg_device;
 	}
 
+	ks0108_parport = port;
 	ks0108_inited = 1;
 	return;
 
@@ -167,6 +168,7 @@ static void ks0108_parport_detach(struct parport *port)
 	parport_release(ks0108_pardevice);
 	parport_unregister_device(ks0108_pardevice);
 	ks0108_pardevice = NULL;
+	ks0108_parport = NULL;
 }
 
 /*
-- 
1.9.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-08-13 13:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-13 13:36 [PATCH] auxdisplay: ks0108: initialize local parport variable Sudip Mukherjee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®