Staging: ipack/devices/ipoctal: fix dereference NULL pointer
authorSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Fri, 13 Jul 2012 11:33:13 +0000 (13:33 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Jul 2012 02:11:37 +0000 (19:11 -0700)
commit1337b07e664c5a40ae0c5cbc13f5da4cf37c870c
treed3d1c94a61883b020efbc0bbe8d3424c336d9e3e
parentd254eb7418e389e063831d8d77b7dac240288f02
Staging: ipack/devices/ipoctal: fix dereference NULL pointer

After opening and closing the file /dev/ipoctal.X.Y.Z for the second time, it
gives a kernel oops due to a dereference of a NULL pointer.

The problem was that tty->driver_data was not properly initialized when
accessing the file for the second time.

Reported-by: Alberto Garcia Gonzalez <agarcia@igalia.com>
Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ipack/devices/ipoctal.c