[PATCH][V2] UBI: block: fix dereference on uninitialized dev

Artem Bityutskiy dedekind1 at gmail.com
Mon Sep 8 05:56:30 PDT 2014


On Wed, 2014-08-20 at 10:19 +0100, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
> 
> 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

Picked this one, thanks!

-- 
Best Regards,
Artem Bityutskiy




More information about the linux-mtd mailing list