summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/spi/spi-sg2044-nor.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/spi/spi-sg2044-nor.c b/drivers/spi/spi-sg2044-nor.c
index 5e68202b59fc..a59aa3fc55d2 100644
--- a/drivers/spi/spi-sg2044-nor.c
+++ b/drivers/spi/spi-sg2044-nor.c
@@ -428,7 +428,6 @@ static int sg2044_spifmc_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct spi_controller *ctrl;
struct sg2044_spifmc *spifmc;
- void __iomem *base;
int ret;
ctrl = devm_spi_alloc_host(&pdev->dev, sizeof(*spifmc));
@@ -445,8 +444,8 @@ static int sg2044_spifmc_probe(struct platform_device *pdev)
spifmc->ctrl = ctrl;
spifmc->io_base = devm_platform_ioremap_resource(pdev, 0);
- if (IS_ERR(base))
- return PTR_ERR(base);
+ if (IS_ERR(spifmc->io_base))
+ return PTR_ERR(spifmc->io_base);
ctrl->num_chipselect = 1;
ctrl->dev.of_node = pdev->dev.of_node;