pkgix: prefix_upgrade: Fix returning error code on error

Signed-off-by: Marco Elver <me@marcoelver.com>