android_kernel_lge_bullhead/drivers/staging/comedi
Ian Abbott fe7e5549d0 staging: comedi: fix clean-up of comedi_class in comedi_init()
commit a9332e9ad09c2644c99058fcf6ae2f355e93ce74 upstream.

There is a clean-up bug in the core comedi module initialization
functions, `comedi_init()`.  If the `comedi_num_legacy_minors` module
parameter is non-zero (and valid), it creates that many "legacy" devices
and registers them in SysFS.  A failure causes the function to clean up
and return an error.  Unfortunately, it fails to destroy the "comedi"
class that was created earlier.  Fix it by adding a call to
`class_destroy(comedi_class)` at the appropriate place in the clean-up
sequence.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Cc: <stable@vger.kernel.org> # 3.9+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
2017-11-01 22:12:43 +01:00
..
drivers staging: comedi: daqboard2000: bug fix board type matching code 2016-10-20 00:46:31 +02:00
kcomedilib staging: comedi: use EXPORT_SYMBOL_GPL() for all exported symbols 2013-04-12 15:09:59 -07:00
Kconfig staging: comedi: work without HAS_DMA 2013-05-13 17:38:46 -04:00
Makefile staging: comedi: conditionally build in PCMCIA driver support 2013-01-31 10:38:10 +01:00
TODO
comedi.h staging: comedi: deprecate loading firmware with comedi_config 2013-01-17 16:51:46 -08:00
comedi_buf.c staging: comedi: complain if dma buffer allocation not supported 2013-05-13 17:38:48 -04:00
comedi_compat32.c staging: comedi: comedi_compat32.c: fix COMEDI_CMD copy back 2015-03-18 13:22:34 +01:00
comedi_compat32.h staging: comedi: shrink comedi_compat32.h 2012-06-20 12:57:43 -07:00
comedi_fops.c staging: comedi: fix clean-up of comedi_class in comedi_init() 2017-11-01 22:12:43 +01:00
comedi_internal.h staging: comedi: change comedi_alloc_board_minor() to return pointer 2013-04-05 14:33:17 -07:00
comedi_pci.c staging: comedi: comedi_pci: dev->board_name is always valid 2013-04-08 11:39:19 -07:00
comedi_pcmcia.c staging: comedi: comedi_pcmcia: allow drivers to use a custom conf_check() 2013-02-05 18:16:19 -08:00
comedi_usb.c staging: comedi: comedi_usb: allow comedi usb drivers to pass a 'context' 2013-02-05 18:07:11 -08:00
comedidev.h staging: comedi: drivers: introduce comedi_legacy_detach() 2013-04-19 11:19:52 -07:00
comedilib.h
drivers.c staging: comedi: bug-fix NULL pointer dereference on failed attach 2013-08-29 09:47:36 -07:00
proc.c staging: single_open() leaks 2013-05-05 00:15:43 -04:00
range.c staging: comedi: use EXPORT_SYMBOL_GPL() for all exported symbols 2013-04-12 15:09:59 -07:00