[PATCH 1/2] MTD: check for valid pdata inside plat_nand

Artem Bityutskiy dedekind1 at gmail.com
Fri Aug 17 10:03:35 EDT 2012


On Sun, 2012-07-22 at 08:59 +0200, John Crispin wrote:
> If plat_nand loads and the platform_data is not properly set it will segfault.
> 
> Signed-off-by: John Crispin <blogic at openwrt.org>
> Acked-by: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
> Cc: linux-mtd at lists.infradead.org
> ---
> I am seeing this when plat_nand is referenced inside my DT file but
> CONFIG_MTD_NAND_XWAY is not selected, resulting in platform_data not being
> populated with valid data.

Aiaiai complains like this for this patch-set:

--------------------------------------------------------------------------------

Successfully built configuration "mips-lantiq_defconfig,mips,mips-linux-", results:

--- before_patching.log
+++ after_patching.log
@@ @@
+drivers/mtd/nand/xway_nand.c:145:9: warning: cast removes address space of expression [sparse]
+drivers/mtd/nand/xway_nand.c:163:25: warning: duplicate const  [sparse]
+drivers/mtd/nand/xway_nand.c:184:12: warning: symbol 'xway_register_nand' was not declared. Should it be static? [sparse]
+drivers/mtd/nand/xway_nand.c:184:12: warning: no previous prototype for 'xway_register_nand' [-Wmissing-prototypes]

--------------------------------------------------------------------------------


-- 
Best Regards,
Artem Bityutskiy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20120817/ca192535/attachment.sig>


More information about the linux-mtd mailing list