Skip to content
Commit f78ec6b2 authored by Dan Carpenter's avatar Dan Carpenter Committed by David Woodhouse
Browse files

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: default avatarDan Carpenter <error27@gmail.com>
Acked-by: default avatarAnton Vorontsov <cbouatmailru@gmail.com>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent b06cd21e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment