diff options
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 9ad18e62658d..310ede575caa 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, | |||
| 128 | int count, int *eof, void *data) | 128 | int count, int *eof, void *data) |
| 129 | { | 129 | { |
| 130 | char *p = buf; | 130 | char *p = buf; |
| 131 | int rc; | ||
| 131 | 132 | ||
| 132 | bus_for_each_drv(&pcmcia_bus_type, NULL, | 133 | rc = bus_for_each_drv(&pcmcia_bus_type, NULL, |
| 133 | (void *) &p, proc_read_drivers_callback); | 134 | (void *) &p, proc_read_drivers_callback); |
| 135 | if (rc < 0) | ||
| 136 | return rc; | ||
| 134 | 137 | ||
| 135 | return (p - buf); | 138 | return (p - buf); |
| 136 | } | 139 | } |
| @@ -269,8 +272,10 @@ rescan: | |||
| 269 | * Prevent this racing with a card insertion. | 272 | * Prevent this racing with a card insertion. |
| 270 | */ | 273 | */ |
| 271 | mutex_lock(&s->skt_mutex); | 274 | mutex_lock(&s->skt_mutex); |
| 272 | bus_rescan_devices(&pcmcia_bus_type); | 275 | ret = bus_rescan_devices(&pcmcia_bus_type); |
| 273 | mutex_unlock(&s->skt_mutex); | 276 | mutex_unlock(&s->skt_mutex); |
| 277 | if (ret) | ||
| 278 | goto err_put_module; | ||
| 274 | 279 | ||
| 275 | /* check whether the driver indeed matched. I don't care if this | 280 | /* check whether the driver indeed matched. I don't care if this |
| 276 | * is racy or not, because it can only happen on cardmgr access | 281 | * is racy or not, because it can only happen on cardmgr access |
