[PATCH] PCMCIA: fix __must_check warnings
Fix the remaining __must_check warnings in the PCMCIA core. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
This commit is contained in:
parent
4deb7c1ed2
commit
f901b8c46f
1 changed files with 10 additions and 3 deletions
|
@ -717,6 +717,7 @@ static int pcmcia_requery(struct device *dev, void * _data)
|
||||||
static void pcmcia_bus_rescan(struct pcmcia_socket *skt)
|
static void pcmcia_bus_rescan(struct pcmcia_socket *skt)
|
||||||
{
|
{
|
||||||
int no_devices=0;
|
int no_devices=0;
|
||||||
|
int ret = 0;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
/* must be called with skt_mutex held */
|
/* must be called with skt_mutex held */
|
||||||
|
@ -729,7 +730,7 @@ static void pcmcia_bus_rescan(struct pcmcia_socket *skt)
|
||||||
* missing resource information or other trouble, we need to
|
* missing resource information or other trouble, we need to
|
||||||
* do this now. */
|
* do this now. */
|
||||||
if (no_devices) {
|
if (no_devices) {
|
||||||
int ret = pcmcia_card_add(skt);
|
ret = pcmcia_card_add(skt);
|
||||||
if (ret)
|
if (ret)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -741,7 +742,9 @@ static void pcmcia_bus_rescan(struct pcmcia_socket *skt)
|
||||||
|
|
||||||
/* we re-scan all devices, not just the ones connected to this
|
/* we re-scan all devices, not just the ones connected to this
|
||||||
* socket. This does not matter, though. */
|
* socket. This does not matter, though. */
|
||||||
bus_rescan_devices(&pcmcia_bus_type);
|
ret = bus_rescan_devices(&pcmcia_bus_type);
|
||||||
|
if (ret)
|
||||||
|
printk(KERN_INFO "pcmcia: bus_rescan_devices failed\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int pcmcia_devmatch(struct pcmcia_device *dev,
|
static inline int pcmcia_devmatch(struct pcmcia_device *dev,
|
||||||
|
@ -1001,6 +1004,7 @@ static ssize_t pcmcia_store_allow_func_id_match(struct device *dev,
|
||||||
struct device_attribute *attr, const char *buf, size_t count)
|
struct device_attribute *attr, const char *buf, size_t count)
|
||||||
{
|
{
|
||||||
struct pcmcia_device *p_dev = to_pcmcia_dev(dev);
|
struct pcmcia_device *p_dev = to_pcmcia_dev(dev);
|
||||||
|
int ret;
|
||||||
|
|
||||||
if (!count)
|
if (!count)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
@ -1009,7 +1013,10 @@ static ssize_t pcmcia_store_allow_func_id_match(struct device *dev,
|
||||||
p_dev->allow_func_id_match = 1;
|
p_dev->allow_func_id_match = 1;
|
||||||
mutex_unlock(&p_dev->socket->skt_mutex);
|
mutex_unlock(&p_dev->socket->skt_mutex);
|
||||||
|
|
||||||
bus_rescan_devices(&pcmcia_bus_type);
|
ret = bus_rescan_devices(&pcmcia_bus_type);
|
||||||
|
if (ret)
|
||||||
|
printk(KERN_INFO "pcmcia: bus_rescan_devices failed after "
|
||||||
|
"allowing func_id matches\n");
|
||||||
|
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue