EDAC, thunderx: Fix error handling path in thunderx_lmc_probe()

Return the proper error value if ioremap() fails (and not 0).

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: David Daney <david.daney@cavium.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-edac <linux-edac@vger.kernel.org>
Cc: linux-mips@linux-mips.org
Link: http://lkml.kernel.org/r/20170816045821.14165-1-christophe.jaillet@wanadoo.fr
[ Massage commit message, remove newline. ]
Signed-off-by: Borislav Petkov <bp@suse.de>
This commit is contained in:
Christophe JAILLET 2017-08-16 06:58:21 +02:00 коммит произвёл Borislav Petkov
Родитель 8b073d945c
Коммит 3eaef0fa39
1 изменённых файлов: 2 добавлений и 3 удалений

Просмотреть файл

@ -774,11 +774,10 @@ static int thunderx_lmc_probe(struct pci_dev *pdev,
lmc->xor_bank = lmc_control & LMC_CONTROL_XOR_BANK; lmc->xor_bank = lmc_control & LMC_CONTROL_XOR_BANK;
l2c_ioaddr = ioremap(L2C_CTL | FIELD_PREP(THUNDERX_NODE, lmc->node), l2c_ioaddr = ioremap(L2C_CTL | FIELD_PREP(THUNDERX_NODE, lmc->node), PAGE_SIZE);
PAGE_SIZE);
if (!l2c_ioaddr) { if (!l2c_ioaddr) {
dev_err(&pdev->dev, "Cannot map L2C_CTL\n"); dev_err(&pdev->dev, "Cannot map L2C_CTL\n");
ret = -ENOMEM;
goto err_free; goto err_free;
} }