diff options
author | H Hartley Sweeten | 2012-12-19 23:44:46 +0100 |
---|---|---|
committer | Greg Kroah-Hartman | 2013-01-07 23:25:49 +0100 |
commit | 401d99de5c0b70f7d64a410ed01d19032698656c (patch) | |
tree | 66fff867ed438b284765c449828509bf3a26c8df /drivers | |
parent | staging: comedi: comedi_fops: introduce comedi_is_subdevice_idle() (diff) | |
download | kernel-qcow2-linux-401d99de5c0b70f7d64a410ed01d19032698656c.tar.gz kernel-qcow2-linux-401d99de5c0b70f7d64a410ed01d19032698656c.tar.xz kernel-qcow2-linux-401d99de5c0b70f7d64a410ed01d19032698656c.zip |
staging: comedi: comedi_fops: cleanup comedi_{read, write}_subdevice()
Flip the info->device tests so than the return NULL occurs last.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/comedi/comedi_fops.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c index 33f5187e49db..8d407ccd4ed4 100644 --- a/drivers/staging/comedi/comedi_fops.c +++ b/drivers/staging/comedi/comedi_fops.c @@ -118,9 +118,9 @@ comedi_read_subdevice(const struct comedi_file_info *info) { if (info->read_subdevice) return info->read_subdevice; - if (info->device == NULL) - return NULL; - return info->device->read_subdev; + if (info->device) + return info->device->read_subdev; + return NULL; } static struct comedi_subdevice * @@ -128,9 +128,9 @@ comedi_write_subdevice(const struct comedi_file_info *info) { if (info->write_subdevice) return info->write_subdevice; - if (info->device == NULL) - return NULL; - return info->device->write_subdev; + if (info->device) + return info->device->write_subdev; + return NULL; } static int resize_async_buffer(struct comedi_device *dev, |