Skip to content

Commit 48303ef

Browse files
committed
spi: sg2044-nor: fix a couple static checker bugs
Merge series from Dan Carpenter <dan.carpenter@linaro.org>: Here are two fixes for Smatch warnings. Dan Carpenter (2): spi: sg2044-nor: fix signedness bug in sg2044_spifmc_write() spi: sg2044-nor: Fix uninitialized variable in probe drivers/spi/spi-sg2044-nor.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) -- 2.47.2
2 parents cc1273d + a1d8f70 commit 48303ef

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/spi/spi-sg2044-nor.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,6 @@ static int sg2044_spifmc_probe(struct platform_device *pdev)
428428
struct device *dev = &pdev->dev;
429429
struct spi_controller *ctrl;
430430
struct sg2044_spifmc *spifmc;
431-
void __iomem *base;
432431
int ret;
433432

434433
ctrl = devm_spi_alloc_host(&pdev->dev, sizeof(*spifmc));
@@ -445,8 +444,8 @@ static int sg2044_spifmc_probe(struct platform_device *pdev)
445444
spifmc->ctrl = ctrl;
446445

447446
spifmc->io_base = devm_platform_ioremap_resource(pdev, 0);
448-
if (IS_ERR(base))
449-
return PTR_ERR(base);
447+
if (IS_ERR(spifmc->io_base))
448+
return PTR_ERR(spifmc->io_base);
450449

451450
ctrl->num_chipselect = 1;
452451
ctrl->dev.of_node = pdev->dev.of_node;

0 commit comments

Comments
 (0)