Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 401d99de authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman
Browse files

staging: comedi: comedi_fops: cleanup comedi_{read, write}_subdevice()



Flip the info->device tests so than the return NULL occurs last.

Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9682e28c
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -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;
	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;
	if (info->device)
		return info->device->write_subdev;
	return NULL;
}

static int resize_async_buffer(struct comedi_device *dev,