ARM: S3C: Fix NAND device registration by s3c_nand_set_platdata().
authorBen Dooks <ben-linux@fluff.org>
Wed, 23 Dec 2009 20:34:29 +0000 (20:34 +0000)
committerBen Dooks <ben-linux@fluff.org>
Wed, 23 Dec 2009 20:34:29 +0000 (20:34 +0000)
commit2b542a13a94f310e718f2ed57b0f712b9ddbbbef
tree3705df4d0494150be7c7e7d3813049e5dc906dbb
parentce8877b542d946ee4fb29b57dc9d6549648b1558
ARM: S3C: Fix NAND device registration by s3c_nand_set_platdata().

Fix two bugs in s3c_nand_set_platdata() where thet device's platform
data was not set, and the wrong error check was being performed on
the return of s3c_nand_copy_set().

Fixes the following OOPS:

Unable to handle kernel NULL pointer dereference at virtual address 00000004
PC is at s3c24xx_nand_probe+0x234/0x594

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
arch/arm/plat-s3c/dev-nand.c