[PATCH] md: fix oops in error-handling