From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: Miguel Ojeda Sandonis <miguel.ojeda.sandonis@gmail.com>,
gregkh@linuxfoundation.org
Cc: linux-kernel@vger.kernel.org, fengguang.wu@intel.com,
Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Subject: [PATCH] auxdisplay: ks0108: initialize local parport variable
Date: Thu, 13 Aug 2015 19:06:05 +0530 [thread overview]
Message-ID: <1439472965-29153-1-git-send-email-sudipm.mukherjee@gmail.com> (raw)
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
reply other threads:[~2015-08-13 13:36 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1439472965-29153-1-git-send-email-sudipm.mukherjee@gmail.com \
--to=sudipm.mukherjee@gmail.com \
--cc=fengguang.wu@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miguel.ojeda.sandonis@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®