aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ssb/pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ssb/pci.c')
-rw-r--r--drivers/ssb/pci.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/ssb/pci.c b/drivers/ssb/pci.c
index 9e50896233aa..a4b2b99f2c80 100644
--- a/drivers/ssb/pci.c
+++ b/drivers/ssb/pci.c
@@ -620,6 +620,11 @@ static int ssb_pci_sprom_get(struct ssb_bus *bus,
620 int err = -ENOMEM; 620 int err = -ENOMEM;
621 u16 *buf; 621 u16 *buf;
622 622
623 if (!ssb_is_sprom_available(bus)) {
624 ssb_printk(KERN_ERR PFX "No SPROM available!\n");
625 return -ENODEV;
626 }
627
623 buf = kcalloc(SSB_SPROMSIZE_WORDS_R123, sizeof(u16), GFP_KERNEL); 628 buf = kcalloc(SSB_SPROMSIZE_WORDS_R123, sizeof(u16), GFP_KERNEL);
624 if (!buf) 629 if (!buf)
625 goto out; 630 goto out;