ubi: Fix broken cleanup code in attach_by_scanning

The unwind code was not reversing operations correctly and was causing
a hang on any error condition.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2 files changed