staging: comedi: ni_660x: allocate counters early in (*auto_attach)
The ni_gpct_device_construct() could fail allocating the memory for device and its counters. For aesthetics, call the function before initializing the subdevices. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing
Please register or sign in to comment