mtd: fsl-quadspi: possible NULL dereference
authorBrian Norris <computersforpeace@gmail.com>
Mon, 16 Nov 2015 18:45:30 +0000 (10:45 -0800)
committerBrian Norris <computersforpeace@gmail.com>
Wed, 18 Nov 2015 18:31:23 +0000 (10:31 -0800)
commitc98f71d1c05601cff0f302889933798020e08869
tree6ead085b0b422b7adfe2e01c7894e7b61aeafff5
parentfc5adbebac6ffab461492f7a415648b29b1a3b31
mtd: fsl-quadspi: possible NULL dereference

It is theoretically possible to probe this driver without a matching
device tree, so let's guard against this.

Also, use the of_device_get_match_data() helper to make this a bit
simpler.

Coverity complained about this one.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Acked-by: Han xu <han.xu@freescale.com>
drivers/mtd/spi-nor/fsl-quadspi.c