mirror of
https://github.com/torvalds/linux.git
synced 2025-04-09 14:45:27 +00:00
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
This commit is contained in:
commit
48303ef31d
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user