summaryrefslogtreecommitdiff
path: root/drivers/s390/char/monreader.c
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2012-04-02 15:54:08 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-04-09 22:27:28 +0400
commitfe2fc9ca5d7e5d9144a4039d89a6f1f8967d9263 (patch)
treec1e74648f89313c92e86ac2943dabefc5c4d0e05 /drivers/s390/char/monreader.c
parent9f8c0b081daff1dbf9ca889560bf25aef0a75207 (diff)
downloadlinux-fe2fc9ca5d7e5d9144a4039d89a6f1f8967d9263.tar.xz
TTY: con3215, centralize allocation
There are two copies of allocations of device information. One of them is totally broken. See: raw->cdev = cdev; raw->inbuf = (char *) raw + sizeof(struct raw3215_info); memset(raw, 0, sizeof(struct raw3215_info)); It suggests that this path was never executed. The code uses both raw->cdev and raw->inbuf all over. And it is NULL due to the memset here, so it would panic immediately. I believe nobody used that driver without being a system console. Either way, let us fix it by moving the allocations (and initializations) to a single place. This will save us some double initializations later too. And while at it, initialize the timer properly -- once, at the allocation. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: linux390@de.ibm.com Cc: linux-s390@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/s390/char/monreader.c')
0 files changed, 0 insertions, 0 deletions