Skip to content
Commit df7c3bf2 authored by Stephen Boyd's avatar Stephen Boyd Committed by Lee Jones
Browse files

mfd: cros_ec_dev: Don't advertise junk features on failure



If the feature query fails during this driver's probe, we memset the
features bits to 0, but then we continue to overwrite that with whatever
junk we read back when the feature probing failed. In the case of a SPI
device, it may be complete junk, causing the caller of this function to
think certain features are present when they aren't. Don't copy over the
bad message on failure so we can fail more gracefully.

Fixes: e4244ebd ("platform/chrome: Introduce a new function to check EC features.")
Signed-off-by: default avatarStephen Boyd <swboyd@chromium.org>
Acked-by: default avatarBenson Leung <bleung@chromium.org>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent 3aa2177e
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