aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/spider_net.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/spider_net.c b/drivers/net/spider_net.c
index 0d765f1733b5..2154469678b7 100644
--- a/drivers/net/spider_net.c
+++ b/drivers/net/spider_net.c
@@ -1836,7 +1836,7 @@ spider_net_setup_phy(struct spider_net_card *card)
1836 * spider_net_download_firmware loads the firmware opened by 1836 * spider_net_download_firmware loads the firmware opened by
1837 * spider_net_init_firmware into the adapter. 1837 * spider_net_init_firmware into the adapter.
1838 */ 1838 */
1839static void 1839static int
1840spider_net_download_firmware(struct spider_net_card *card, 1840spider_net_download_firmware(struct spider_net_card *card,
1841 const struct firmware *firmware) 1841 const struct firmware *firmware)
1842{ 1842{
@@ -1857,8 +1857,13 @@ spider_net_download_firmware(struct spider_net_card *card,
1857 } 1857 }
1858 } 1858 }
1859 1859
1860 if (spider_net_read_reg(card, SPIDER_NET_GSINIT))
1861 return -EIO;
1862
1860 spider_net_write_reg(card, SPIDER_NET_GSINIT, 1863 spider_net_write_reg(card, SPIDER_NET_GSINIT,
1861 SPIDER_NET_RUN_SEQ_VALUE); 1864 SPIDER_NET_RUN_SEQ_VALUE);
1865
1866 return 0;
1862} 1867}
1863 1868
1864/** 1869/**
@@ -1909,9 +1914,8 @@ spider_net_init_firmware(struct spider_net_card *card)
1909 goto out; 1914 goto out;
1910 } 1915 }
1911 1916
1912 spider_net_download_firmware(card, firmware); 1917 if (!spider_net_download_firmware(card, firmware))
1913 1918 err = 0;
1914 err = 0;
1915out: 1919out:
1916 release_firmware(firmware); 1920 release_firmware(firmware);
1917 1921