diff options
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/pch_phub.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/misc/pch_phub.c b/drivers/misc/pch_phub.c index a5925f7f17f6..956597321d2a 100644 --- a/drivers/misc/pch_phub.c +++ b/drivers/misc/pch_phub.c | |||
@@ -636,6 +636,7 @@ static ssize_t store_pch_mac(struct device *dev, struct device_attribute *attr, | |||
636 | u8 mac[ETH_ALEN]; | 636 | u8 mac[ETH_ALEN]; |
637 | ssize_t rom_size; | 637 | ssize_t rom_size; |
638 | struct pch_phub_reg *chip = dev_get_drvdata(dev); | 638 | struct pch_phub_reg *chip = dev_get_drvdata(dev); |
639 | int ret; | ||
639 | 640 | ||
640 | if (!mac_pton(buf, mac)) | 641 | if (!mac_pton(buf, mac)) |
641 | return -EINVAL; | 642 | return -EINVAL; |
@@ -644,8 +645,10 @@ static ssize_t store_pch_mac(struct device *dev, struct device_attribute *attr, | |||
644 | if (!chip->pch_phub_extrom_base_address) | 645 | if (!chip->pch_phub_extrom_base_address) |
645 | return -ENOMEM; | 646 | return -ENOMEM; |
646 | 647 | ||
647 | pch_phub_write_gbe_mac_addr(chip, mac); | 648 | ret = pch_phub_write_gbe_mac_addr(chip, mac); |
648 | pci_unmap_rom(chip->pdev, chip->pch_phub_extrom_base_address); | 649 | pci_unmap_rom(chip->pdev, chip->pch_phub_extrom_base_address); |
650 | if (ret) | ||
651 | return ret; | ||
649 | 652 | ||
650 | return count; | 653 | return count; |
651 | } | 654 | } |