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: NDan Carpenter <error27@gmail.com> Acked-by: NAnton Vorontsov <cbouatmailru@gmail.com> Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
Showing
想要评论请 注册 或 登录