]> git.karo-electronics.de Git - linux-beck.git/commit
staging: comedi: unioxx5: fix unioxx5_detach()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 24 Jun 2013 23:23:00 +0000 (16:23 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Jun 2013 23:43:40 +0000 (16:43 -0700)
commit7f5ac6f4f595b4b17b15ff6701f07377bea8ffd3
treee2431be18a85815eb60251a78c4dca13ed5f10fe
parent27a9095aa00426f80660df0e5f857a06852e1496
staging: comedi: unioxx5: fix unioxx5_detach()

During the attach of this driver, it's possible for the allocation
of the subdevice private data to fail. It's also possible that the
io region was not successfully requested.

Validate the pointer and iobase before trying to release the region.

For aesthetic reasons, rename the local variables.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/unioxx5.c