OSDN Git Service

staging: comedi: usbduxfast: remove impossible 'if (!devpriv)' checks
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 24 Aug 2015 17:13:56 +0000 (10:13 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Sep 2015 01:24:24 +0000 (18:24 -0700)
commitfd9fe1fc1cd4771eff4666379b915661d7a4f0d2
tree0dd371196bc20a2236c61218ed58641ee267271a
parentdb1876ff1e7c86dc97d1721ce2e5e0df71072acb
staging: comedi: usbduxfast: remove impossible 'if (!devpriv)' checks

The private data 'devpriv' is allocated in the (*auto_attach) before
the subdevices are initialized and the (*auto_attach) has to complete
successfully before the core will call any of the subdevice operations.
Because of this the (!devpriv) checks in the subdevice code can never
fail. Remove them.

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>
drivers/staging/comedi/drivers/usbduxfast.c