[ARM] 5245/1: Fix warning about unused return value in drivers/pcmcia
authorJürgen Schindele <linux@schindele.name>
Mon, 8 Sep 2008 21:06:29 +0000 (22:06 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 13 Sep 2008 19:07:42 +0000 (20:07 +0100)
Fix warning when compiling "drivers/pcmcia/soc-common.c"
The return value of the function "device_create_file"
was not used / assigned.

Signed-off-by: Jrgen Schindele <linux@schindele.name>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
drivers/pcmcia/soc_common.c

index c48f3f69bdaf419f7e7394a37e081976244a99af..da3972153226a019c424ae98972ae8796e274f89 100644 (file)
@@ -748,7 +748,9 @@ int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops
 
                add_timer(&skt->poll_timer);
 
-               device_create_file(&skt->socket.dev, &dev_attr_status);
+               ret = device_create_file(&skt->socket.dev, &dev_attr_status);
+               if (ret)
+                       goto out_err_8;
        }
 
        dev_set_drvdata(dev, sinfo);
@@ -758,6 +760,8 @@ int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops
        do {
                skt = &sinfo->skt[i];
 
+               device_remove_file(&skt->socket.dev, &dev_attr_status);
+ out_err_8:
                del_timer_sync(&skt->poll_timer);
                pcmcia_unregister_socket(&skt->socket);