[PATCH 4.14 109/173] ubi: Fix an error pointer dereference in error handling code