Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit db7dabf7 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman
Browse files

staging: comedi: vmk80xx: make sure private data is clean when detached



Currently the private data used in this driver is stored in a static
array. During the usb (*probe) and empty location is found in this
array for use by the usb device. Some initialization of the private
data is then done before comedi_usb_auto_config() is called to allow
the comedi core to attach its comedi_device to the usb device.

The (*probe) can fail for various reasons. If it does, make sure that
the private data is clean before returning an error.

The usb (*disconnect) simply calls comedi_usb_auto_unconfig() to
allow the comedi core to disconnect its comedi_device from the usb
device. Since the private data points to the static array it cannot
be kfree'ed during the detach. Instead make sure it clean before
leaving the detach.

Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1cc8f885
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment