disk: part: Don't skip partition init
authorRobert Hancock <hancock@sedsystems.ca>
Tue, 18 Jun 2019 15:53:04 +0000 (09:53 -0600)
committerTom Rini <trini@konsulko.com>
Fri, 21 Jun 2019 14:07:11 +0000 (10:07 -0400)
commit4edfabd9e40d72480418d4ce39228abd6c0f4f02
tree6ecc6eb66f5e804535ec7419de2983be25da590d
parent3d2ab90d16ae3f54ef58d0474693646a2801bc57
disk: part: Don't skip partition init

blk_get_device_by_str was skipping part_init when hw partition 0 was
selected because it is the default. However, this caused issues when
switching to a non-zero partition and then back to partition zero, as
stale data from the wrong partition was returned.

Remove this optimization and call part_init regardless of the selected
partition.

Signed-off-by: Robert Hancock <hancock@sedsystems.ca>
disk/part.c