From: H Hartley Sweeten Date: Mon, 29 Jul 2013 21:07:10 +0000 (-0700) Subject: staging: comedi: das16: fix das16_detach() X-Git-Tag: v3.12-rc1~183^2~418 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cb09d912e29605bc5a7bc6a204dda8c8f01cf10d;p=pandora-kernel.git staging: comedi: das16: fix das16_detach() The function das16_reset() needs a valid dev->iobase. Since the iobase is requested after the devpriv has been allocated in the attach, move the das16_reset() call into the if (devpriv) and add a if (dev->iobase). Also, move the release of the extra iobase into the if (devpriv) to prevent an invalid memory access. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed