summaryrefslogtreecommitdiffstats
path: root/drivers/staging/comedi/comedi_fops.c
diff options
context:
space:
mode:
authorIan Abbott2013-04-04 15:58:48 +0200
committerGreg Kroah-Hartman2013-04-05 23:33:17 +0200
commitf5b31e15acd1ab2fd9b9022c29a66f4625fa5658 (patch)
tree09401f9dd4335b7f9c572a02fa67717653d77a93 /drivers/staging/comedi/comedi_fops.c
parentstaging: comedi: add comedi_release_hardware_device() (diff)
downloadkernel-qcow2-linux-f5b31e15acd1ab2fd9b9022c29a66f4625fa5658.tar.gz
kernel-qcow2-linux-f5b31e15acd1ab2fd9b9022c29a66f4625fa5658.tar.xz
kernel-qcow2-linux-f5b31e15acd1ab2fd9b9022c29a66f4625fa5658.zip
staging: comedi: call comedi_release_hardware_device() on error
If `comedi_auto_config()` fails after allocating the minor device, call `comedi_release_hardware_device()` instead of `comedi_free_board_minor()` to free the minor device. That's the same call that `comedi_auto_unconfig()` uses, and is slightly safer as it checks the minor device number is still tied to the same hardware device. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi/comedi_fops.c')
0 files changed, 0 insertions, 0 deletions