Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Alexander Stein and committed by
Greg Kroah-Hartman
a246b973 35272754

+4 -1
+4 -1
drivers/misc/pch_phub.c
··· 636 636 u8 mac[ETH_ALEN]; 637 637 ssize_t rom_size; 638 638 struct pch_phub_reg *chip = dev_get_drvdata(dev); 639 + int ret; 639 640 640 641 if (!mac_pton(buf, mac)) 641 642 return -EINVAL; ··· 645 644 if (!chip->pch_phub_extrom_base_address) 646 645 return -ENOMEM; 647 646 648 - pch_phub_write_gbe_mac_addr(chip, mac); 647 + ret = pch_phub_write_gbe_mac_addr(chip, mac); 649 648 pci_unmap_rom(chip->pdev, chip->pch_phub_extrom_base_address); 649 + if (ret) 650 + return ret; 650 651 651 652 return count; 652 653 }