From: Dan Carpenter Date: Thu, 12 Aug 2010 07:58:27 +0000 (+0200) Subject: mtd/m25p80: fix test for end of loop X-Git-Tag: v2.6.36-rc1~3^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f78ec6b2f32efad1fc6b2196e966dcec8122d689;p=pandora-kernel.git mtd/m25p80: fix test for end of loop "plat_id" is always non-NULL here. There is a zero element on the end of the m25p_ids[] array and if we hit the end of the loop then plat_id points to that. This would lead to a NULL pointer dereference later on in the function. Signed-off-by: Dan Carpenter Acked-by: Anton Vorontsov Signed-off-by: David Woodhouse --- Reading git-diff-tree failed