UBI: fastmap: do not miss bit-flips

[ Upstream commit 44305ebde243a7cce2c592cc89afe5041d8bf884 ]

The return value from 'ubi_io_read_ec_hdr()' was stored in 'err', not in 'ret'.
This fix makes sure Fastmap-enabled UBI does not miss bit-flip while reading EC
headers, events and scrubs the affected PEBs.

This issue was reported by Coverity Scan.

Artem: improved the commit message.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Acked-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
(cherry picked from commit bb16cc1da3af7fc9c86e188d1533d90ce5d13bc9)
i2c: omap: enhance pinctrl support

Update i2c-omap driver to set the state of the pins to:
- "sleep" on suspend
- "default" on resume

By optionally putting the pins into default/sleep state in the
suspend callback we can accomplish two things.
- minimize current leakage from pins and thus save power,
- prevent the IP from driving pins output in an uncontrolled manner,
   which may happen if the power domain drops the domain regulator.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
(cherry picked from commit 318db56902f889dc1836e6e928ebffd5364f90b0)
drivers: spi: ti-omap2-mcspi.c: Enhance pinctrl support

Update ti-omap2-mcspi driver to set the state of the pins to:
- "sleep" on suspend
- "default" on resume

By optionally putting the pins into sleep state in the suspend callback
we can accomplish two things.
- minimize current leakage from pins and thus save power,
- prevent the IP from driving pins output in an uncontrolled manner,
which may happen if the power domain drops the domain regulator.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Tested-by: Sourav Poddar <sourav.poddar@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
(cherry picked from commit af12f245991a1641287108c48b1b83586b356c79)