From: H Hartley Sweeten Date: Sat, 30 Jun 2012 00:39:45 +0000 (-0700) Subject: staging: comedi: ni_670x: fix dereference of an invalid pointer X-Git-Tag: v3.6-rc1~100^2~449 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=70fcd1b7a6be4f4f60f4d05beeb3976bb0eaf6a2;p=pandora-kernel.git staging: comedi: ni_670x: fix dereference of an invalid pointer The attach if this driver can fail before the subdevices are allocated. If the attach fails the comedi core will call the detach routine to allow the driver to do it's cleanup. We need to make sure that the subdevice allocation was successful before trying to dereference subdevice[0] to free the allocated range table list. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed