commit | 87ed89d21ede38f86be9419ca7c6dd4761764bbb | [log] [tgz] |
---|---|---|
author | Tanya Brokhman <tlinder@codeaurora.org> | Tue Apr 01 11:01:12 2014 +0300 |
committer | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | Mon May 05 09:31:33 2014 +0300 |
tree | 465df391e8858ae8575a2bf72815e4302ab83386 | |
parent | fcdd57c8902a936a616df2066d873b38ef3ed364 [diff] |
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 <tlinder@codeaurora.org> Reviewed-by: Dolev Raviv <draviv@codeaurora.org> Acked-by: Richard Weinberger <richard@nod.at> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>