From: Tanya Brokhman Date: Tue, 1 Apr 2014 08:01:12 +0000 (+0300) Subject: UBI: fix error path in __wl_get_peb X-Git-Tag: omap-for-v3.16/fixes-against-rc1~221^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=87ed89d21ede38f86be9419ca7c6dd4761764bbb;p=pandora-kernel.git UBI: fix error path in __wl_get_peb In case of an error (if there are not free PEB's for example), __wl_get_peb will return a negative value. In order to prevent access violation we need to test the returned value prior to using it later on. Signed-off-by: Tatyana Brokhman Reviewed-by: Dolev Raviv Acked-by: Richard Weinberger Signed-off-by: Artem Bityutskiy --- Reading git-diff-tree failed