From: H Hartley Sweeten Date: Thu, 25 Oct 2012 22:05:46 +0000 (-0700) Subject: staging: comedi: me_daq: fix pointer dereference in me_detach() X-Git-Tag: omap-for-v3.8/fixes-for-merge-window-v4-signed~84^2~940 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=736b605c897204b8c05f15160f12e70c61b2e6e6;p=pandora-kernel.git staging: comedi: me_daq: fix pointer dereference in me_detach() As pointed out by Dan Carpenter, dev_private could be NULL when it is checked before calling comedi_pci_disable(). The private data variable 'plx_regbase_size' is only used to see if the pci device has been enabled. Remove that variable from the private data and just use the unused dev->iobase variable to let the detach know that the pci device is enabled. Signed-off-by: H Hartley Sweeten Reported-by: Dan Carpenter Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed