UBI: block: fix dereference on uninitialized dev
UBI: block: fix dereference on uninitialized dev

commit 4df38926f337 ("UBI: block: Avoid disk size integer overflow")
introduced a dereference on dev (which is not initialized at that
point) when printing a warning message.  Re-order disk_capacity check
after the dev is found.

Found by cppcheck:
 [drivers/mtd/ubi/block.c:509]: (error) Uninitialized variable: dev

Artem: tweak the error message a bit

Signed-off-by: Colin Ian King <d100aa70785e45ee8deab668147d941941915c21@canonical.com>
Acked-by: Ezequiel Garcia <7248f52d8926fd82a5eb079a13afe9dd79e34c7a@free-electrons.com>
Signed-off-by: Artem Bityutskiy <2f96f8cd3e2780a209d0ab27d1b44624d0019d3f@linux.intel.com>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs