From cb09d912e29605bc5a7bc6a204dda8c8f01cf10d Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Mon, 29 Jul 2013 14:07:10 -0700 Subject: [PATCH] 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-format-patch failed