diff options
author | Mathias Kresin <dev@kresin.me> | 2018-07-08 01:38:08 +0200 |
---|---|---|
committer | Mathias Kresin <dev@kresin.me> | 2018-07-24 22:24:21 +0200 |
commit | fdf6760cda15b2710287c66c9969a3ed527793d8 (patch) | |
tree | a4ebd183378dd0a2d37c2c0d979e2c535b3ac303 /target/linux/ppc40x/image | |
parent | 354de22bad37ef8f91f9a8f65b65f402713629ec (diff) | |
download | upstream-fdf6760cda15b2710287c66c9969a3ed527793d8.tar.gz upstream-fdf6760cda15b2710287c66c9969a3ed527793d8.tar.bz2 upstream-fdf6760cda15b2710287c66c9969a3ed527793d8.zip |
kernel: improve ubi auto attach code readability
Move the put_mtd_device() called on multiple error conditions to a goto
label to use it later for more error conditions.
The early return on failed open of the mtd device and mismatching mtd
type allows to get rid of one level of indentation. By jumping to the
cleanup code, a refcount bug is fixed for the wrong flash type condition.
While at it, make clear that we only check for the UBI magic if the read
from flash was successful.
Signed-off-by: Mathias Kresin <dev@kresin.me>
Diffstat (limited to 'target/linux/ppc40x/image')
0 files changed, 0 insertions, 0 deletions