spi: sg2044-nor: fix a couple static checker bugs
authorMark Brown <broonie@kernel.org>
Tue, 18 Mar 2025 14:37:39 +0000 (14:37 +0000)
committerMark Brown <broonie@kernel.org>
Tue, 18 Mar 2025 14:37:39 +0000 (14:37 +0000)
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

1  2 
drivers/spi/spi-sg2044-nor.c

index 5e68202b59fcafeca308403cbf1d715ebda2bafa,97d6b3a21d545f0287d650c1bfa8bf38a2ea09b0..a59aa3fc55d277653d01df9c83b3f0aa08edab46
@@@ -425,10 -425,8 +425,9 @@@ static void sg2044_spifmc_init(struct s
  
  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));