Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 354117
b: refs/heads/master
c: 57b71c3
h: refs/heads/master
i:
  354115: c0439e8
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Jan 21, 2013
1 parent 3f87c2b commit 6a07ea9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 40f58a65c9f6cbb540ec2db6ac9d963d402014c3
refs/heads/master: 57b71c3e6f4c8b944e6721d89ccb566aee439f97
12 changes: 10 additions & 2 deletions trunk/drivers/staging/comedi/drivers.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,16 @@ static int __comedi_device_postconfig_async(struct comedi_device *dev,
unsigned int buf_size;
int ret;

BUG_ON((s->subdev_flags & (SDF_CMD_READ | SDF_CMD_WRITE)) == 0);
BUG_ON(!s->do_cmdtest);
if ((s->subdev_flags & (SDF_CMD_READ | SDF_CMD_WRITE)) == 0) {
dev_warn(dev->class_dev,
"async subdevices must support SDF_CMD_READ or SDF_CMD_WRITE\n");
return -EINVAL;
}
if (!s->do_cmdtest) {
dev_warn(dev->class_dev,
"async subdevices must have a do_cmdtest() function\n");
return -EINVAL;
}

async = kzalloc(sizeof(*async), GFP_KERNEL);
if (!async) {
Expand Down

0 comments on commit 6a07ea9

Please sign in to comment.