From: Denis Joseph Barrow Date: Tue, 25 Nov 2008 08:27:50 +0000 (-0800) Subject: hso: Fix crashes on close. X-Git-Tag: v2.6.29-rc1~581^2~502 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4a3e818181e1baf970e9232ca8b747e233176b87;p=pandora-kernel.git hso: Fix crashes on close. Moved serial_open_count in hso_serial_open to prevent crashes owing to the serial structure being made NULL when hso_serial_close is called even though hso_serial_open returned -ENODEV, Alan Cox pointed out this happens, also put in sanity check in hso_serial_close to check for a valid serial structure which should prevent the most reproducable crash in the driver when the hso device is disconnected while in use. Signed-off-by: Denis Joseph Barrow Signed-off-by: David S. Miller --- Reading git-diff-tree failed