Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 257634
b: refs/heads/master
c: 1c073b6
h: refs/heads/master
v: v3
  • Loading branch information
Eliot Blennerhassett authored and Takashi Iwai committed Jul 22, 2011
1 parent f00a9bd commit 8558a54
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 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: 0a17e993076f226aca3463a1c7fb9265e06ed2d3
refs/heads/master: 1c073b6797969dfc808d077cf28f9e0205070edd
10 changes: 3 additions & 7 deletions trunk/sound/pci/asihpi/hpioctl.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*******************************************************************************
AudioScience HPI driver
Copyright (C) 1997-2010 AudioScience Inc. <support@audioscience.com>
Copyright (C) 1997-2011 AudioScience Inc. <support@audioscience.com>
This program is free software; you can redistribute it and/or modify
it under the terms of version 2 of the GNU General Public License as
Expand Down Expand Up @@ -157,11 +157,6 @@ long asihpi_hpi_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
goto out;
}

if (hm->h.adapter_index >= HPI_MAX_ADAPTERS) {
err = -EINVAL;
goto out;
}

switch (hm->h.function) {
case HPI_SUBSYS_CREATE_ADAPTER:
case HPI_ADAPTER_DELETE:
Expand All @@ -187,7 +182,6 @@ long asihpi_hpi_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
/* -1=no data 0=read from user mem, 1=write to user mem */
int wrflag = -1;
u32 adapter = hm->h.adapter_index;
pa = &adapters[adapter];

if ((adapter > HPI_MAX_ADAPTERS) || (!pa->type)) {
hpi_init_response(&hr->r0, HPI_OBJ_ADAPTER,
Expand All @@ -203,6 +197,8 @@ long asihpi_hpi_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
goto out;
}

pa = &adapters[adapter];

if (mutex_lock_interruptible(&adapters[adapter].mutex)) {
err = -EINTR;
goto out;
Expand Down

0 comments on commit 8558a54

Please sign in to comment.