projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[GFS2] Mount problem with the GFS2 code
[powerpc.git]
/
drivers
/
pcmcia
/
pcmcia_ioctl.c
diff --git
a/drivers/pcmcia/pcmcia_ioctl.c
b/drivers/pcmcia/pcmcia_ioctl.c
index
738b1ef
..
310ede5
100644
(file)
--- 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 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);
}
return (p - buf);
}
@@
-269,8
+272,10
@@
rescan:
* Prevent this racing with a card insertion.
*/
mutex_lock(&s->skt_mutex);
* 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);
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
/* check whether the driver indeed matched. I don't care if this
* is racy or not, because it can only happen on cardmgr access
@@
-601,12
+606,8
@@
static int ds_ioctl(struct inode * inode, struct file * file,
ret = CS_BAD_ARGS;
else {
struct pcmcia_device *p_dev = get_pcmcia_device(s, buf->config.Function);
ret = CS_BAD_ARGS;
else {
struct pcmcia_device *p_dev = get_pcmcia_device(s, buf->config.Function);
- if (p_dev == NULL)
- ret = CS_BAD_ARGS;
- else {
- ret = pccard_get_configuration_info(s, p_dev, &buf->config);
- pcmcia_put_dev(p_dev);
- }
+ ret = pccard_get_configuration_info(s, p_dev, &buf->config);
+ pcmcia_put_dev(p_dev);
}
break;
case DS_GET_FIRST_TUPLE:
}
break;
case DS_GET_FIRST_TUPLE:
@@
-636,12
+637,8
@@
static int ds_ioctl(struct inode * inode, struct file * file,
ret = CS_BAD_ARGS;
else {
struct pcmcia_device *p_dev = get_pcmcia_device(s, buf->status.Function);
ret = CS_BAD_ARGS;
else {
struct pcmcia_device *p_dev = get_pcmcia_device(s, buf->status.Function);
- if (p_dev == NULL)
- ret = CS_BAD_ARGS;
- else {
- ret = pccard_get_status(s, p_dev, &buf->status);
- pcmcia_put_dev(p_dev);
- }
+ ret = pccard_get_status(s, p_dev, &buf->status);
+ pcmcia_put_dev(p_dev);
}
break;
case DS_VALIDATE_CIS:
}
break;
case DS_VALIDATE_CIS: