diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-10-20 14:44:23 -0700 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-10-25 21:59:46 -0400 |
commit | 4deb7c1ed2b622b565c5330b475adc5a6cea30da (patch) | |
tree | 0ba9b06a057224e602207e9e1079d7ad8cf4c646 /drivers/pcmcia/pcmcia_ioctl.c | |
parent | 26aaa3c202fb3bec8d6c6619122442d476f55658 (diff) | |
download | op-kernel-dev-4deb7c1ed2b622b565c5330b475adc5a6cea30da.zip op-kernel-dev-4deb7c1ed2b622b565c5330b475adc5a6cea30da.tar.gz |
[PATCH] PCMCIA: handle sysfs, PCI errors
Handle sysfs and PCI errors correctly.
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia/pcmcia_ioctl.c')
-rw-r--r-- | drivers/pcmcia/pcmcia_ioctl.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/pcmcia/pcmcia_ioctl.c b/drivers/pcmcia/pcmcia_ioctl.c index 9ad18e6..310ede5 100644 --- a/drivers/pcmcia/pcmcia_ioctl.c +++ b/drivers/pcmcia/pcmcia_ioctl.c @@ -128,9 +128,12 @@ static int proc_read_drivers(char *buf, char **start, off_t pos, int count, int *eof, void *data) { char *p = buf; + int rc; - bus_for_each_drv(&pcmcia_bus_type, NULL, - (void *) &p, proc_read_drivers_callback); + rc = bus_for_each_drv(&pcmcia_bus_type, NULL, + (void *) &p, proc_read_drivers_callback); + if (rc < 0) + return rc; return (p - buf); } @@ -269,8 +272,10 @@ rescan: * Prevent this racing with a card insertion. */ mutex_lock(&s->skt_mutex); - bus_rescan_devices(&pcmcia_bus_type); + ret = bus_rescan_devices(&pcmcia_bus_type); mutex_unlock(&s->skt_mutex); + if (ret) + goto err_put_module; /* check whether the driver indeed matched. I don't care if this * is racy or not, because it can only happen on cardmgr access |