]> err.no Git - linux-2.6/commitdiff
pcmcia: allow for longer CIS firmware files
authorDominik Brodowski <linux@dominikbrodowski.net>
Tue, 24 Jun 2008 13:45:55 +0000 (15:45 +0200)
committerDominik Brodowski <linux@dominikbrodowski.net>
Tue, 24 Jun 2008 13:45:55 +0000 (15:45 +0200)
Don't be more zealous with memory than the firmware class core.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
drivers/pcmcia/ds.c

index 461b8a9a9f381ff82fba1c85efb2d439166fffbe..4174d9656e357f8ec5f16520ad03c86544a5e969 100644 (file)
@@ -850,7 +850,7 @@ static int pcmcia_load_firmware(struct pcmcia_device *dev, char * filename)
 {
        struct pcmcia_socket *s = dev->socket;
        const struct firmware *fw;
-       char path[20];
+       char path[FIRMWARE_NAME_MAX];
        int ret = -ENOMEM;
        int no_funcs;
        int old_funcs;
@@ -862,7 +862,7 @@ static int pcmcia_load_firmware(struct pcmcia_device *dev, char * filename)
 
        ds_dbg(1, "trying to load CIS file %s\n", filename);
 
-       if (strlen(filename) > 14) {
+       if (strlen(filename) > (FIRMWARE_NAME_MAX - 1)) {
                printk(KERN_WARNING "pcmcia: CIS filename is too long [%s]\n",
                        filename);
                return -EINVAL;