diff options
author | Alexander Stein <alexander.stein@systec-electronic.com> | 2014-03-05 10:44:57 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-03-09 07:15:51 +0100 |
commit | a246b97358bcb888fe3d994d120751c3622c3239 (patch) | |
tree | c98d0548893fd80f3d053c87e9ef95f0b886428a /drivers/misc/pch_phub.c | |
parent | iio: adc: Fix build error discovered by 0-day build bot (diff) | |
download | linux-a246b97358bcb888fe3d994d120751c3622c3239.tar.xz linux-a246b97358bcb888fe3d994d120751c3622c3239.zip |
pch_phub: Report error writing MAC back to user
Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/pch_phub.c')
-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, u8 mac[ETH_ALEN]; ssize_t rom_size; struct pch_phub_reg *chip = dev_get_drvdata(dev); + int ret; if (!mac_pton(buf, mac)) return -EINVAL; @@ -644,8 +645,10 @@ static ssize_t store_pch_mac(struct device *dev, struct device_attribute *attr, if (!chip->pch_phub_extrom_base_address) return -ENOMEM; - pch_phub_write_gbe_mac_addr(chip, mac); + ret = pch_phub_write_gbe_mac_addr(chip, mac); pci_unmap_rom(chip->pdev, chip->pch_phub_extrom_base_address); + if (ret) + return ret; return count; } |