Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 37752
b: refs/heads/master
c: d834c16
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Oct 1, 2006
1 parent 32e0ffb commit 935444a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 16 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: 4e9011d50d77ce7d234272e203235d8ecffd61a1
refs/heads/master: d834c16516d1ebec4766fc58c059bf01311e6045
27 changes: 12 additions & 15 deletions trunk/drivers/pcmcia/socket_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ static ssize_t pccard_store_cis(struct kobject *kobj, char *buf, loff_t off, siz
{
struct pcmcia_socket *s = to_socket(container_of(kobj, struct class_device, kobj));
cisdump_t *cis;
ssize_t ret = count;
int error;

if (off)
return -EINVAL;
Expand All @@ -316,25 +316,22 @@ static ssize_t pccard_store_cis(struct kobject *kobj, char *buf, loff_t off, siz
cis->Length = count + 1;
memcpy(cis->Data, buf, count);

if (pcmcia_replace_cis(s, cis))
ret = -EIO;

error = pcmcia_replace_cis(s, cis);
kfree(cis);
if (error)
return -EIO;

if (!ret) {
mutex_lock(&s->skt_mutex);
if ((s->callback) && (s->state & SOCKET_PRESENT) &&
!(s->state & SOCKET_CARDBUS)) {
if (try_module_get(s->callback->owner)) {
s->callback->requery(s);
module_put(s->callback->owner);
}
mutex_lock(&s->skt_mutex);
if ((s->callback) && (s->state & SOCKET_PRESENT) &&
!(s->state & SOCKET_CARDBUS)) {
if (try_module_get(s->callback->owner)) {
s->callback->requery(s);
module_put(s->callback->owner);
}
mutex_unlock(&s->skt_mutex);
}
mutex_unlock(&s->skt_mutex);


return (ret);
return count;
}


Expand Down

0 comments on commit 935444a

Please sign in to comment.