Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a4b81ca5 authored by Dan Carpenter's avatar Dan Carpenter Committed by David Woodhouse
Browse files

mtd: sst25l: check for null consistently



The rest of the function assumes that "data" can be null.  I don't know
the code well enough to say whether it can actually be null, but there
is no harm in checking here.

Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent 00b275db
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -454,7 +454,7 @@ static int __init sst25l_probe(struct spi_device *spi)
						  parts, nr_parts);
		}

	} else if (data->nr_parts) {
	} else if (data && data->nr_parts) {
		dev_warn(&spi->dev, "ignoring %d default partitions on %s\n",
			 data->nr_parts, data->name);
	}