diff options
Diffstat (limited to 'drivers/pcmcia/ds.c')
-rw-r--r-- | drivers/pcmcia/ds.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c index 4174d9656e35..2382341975e5 100644 --- a/drivers/pcmcia/ds.c +++ b/drivers/pcmcia/ds.c | |||
@@ -854,7 +854,6 @@ static int pcmcia_load_firmware(struct pcmcia_device *dev, char * filename) | |||
854 | int ret = -ENOMEM; | 854 | int ret = -ENOMEM; |
855 | int no_funcs; | 855 | int no_funcs; |
856 | int old_funcs; | 856 | int old_funcs; |
857 | cisdump_t *cis; | ||
858 | cistpl_longlink_mfc_t mfc; | 857 | cistpl_longlink_mfc_t mfc; |
859 | 858 | ||
860 | if (!filename) | 859 | if (!filename) |
@@ -877,16 +876,7 @@ static int pcmcia_load_firmware(struct pcmcia_device *dev, char * filename) | |||
877 | goto release; | 876 | goto release; |
878 | } | 877 | } |
879 | 878 | ||
880 | cis = kzalloc(sizeof(cisdump_t), GFP_KERNEL); | 879 | if (!pcmcia_replace_cis(s, fw->data, fw->size)) |
881 | if (!cis) { | ||
882 | ret = -ENOMEM; | ||
883 | goto release; | ||
884 | } | ||
885 | |||
886 | cis->Length = fw->size + 1; | ||
887 | memcpy(cis->Data, fw->data, fw->size); | ||
888 | |||
889 | if (!pcmcia_replace_cis(s, cis)) | ||
890 | ret = 0; | 880 | ret = 0; |
891 | else { | 881 | else { |
892 | printk(KERN_ERR "pcmcia: CIS override failed\n"); | 882 | printk(KERN_ERR "pcmcia: CIS override failed\n"); |