From: Colin Ian King Date: Wed, 20 Aug 2014 09:19:38 +0000 (+0100) Subject: UBI: block: fix dereference on uninitialized dev X-Git-Tag: omap-for-v3.19/prcm-cleanup~74^2~13 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3df770725339c41d1cd9be4da4ca0d968119d8ad;p=pandora-kernel.git 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 Acked-by: Ezequiel Garcia Signed-off-by: Artem Bityutskiy --- Reading git-diff-tree failed