mmc: core: Fix warning and undefined behavior in mmc voltage handling
authorPavel Machek <pavel@ucw.cz>
Tue, 16 Apr 2019 07:58:45 +0000 (09:58 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 29 Apr 2019 10:37:11 +0000 (12:37 +0200)
commit42c38d4a1bc41e78dedbf73b0fb35e44007789bb
tree340bfe840413ec655d0c4ccf509f7a587ab0531f
parent4c94cb651f478e0b53f10b77033b91a5c7702740
mmc: core: Fix warning and undefined behavior in mmc voltage handling

!voltage_ranges is tested for too late, allowing warning and undefined
behavior. Fix that.

Signed-off-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/core/host.c