commit | d63d0816c2f412394c10a0bd17bb83c7b1c2a3de | [log] [tgz] |
---|---|---|
author | Boris Brezillon <bbrezillon@kernel.org> | Wed Jan 02 15:36:54 2019 +0100 |
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | Thu Dec 05 15:35:06 2019 +0100 |
tree | 3d41eec762bb0df285aac618d038a0f2a87e074c | |
parent | 4964ffcbac63267a065fb81af62fbeea5da10ee4 [diff] |
mtd: Check add_mtd_device() ret code [ Upstream commit 2b6f0090a3335b7bdd03ca520c35591159463041 ] add_mtd_device() can fail. We should always check its return value and gracefully handle the failure case. Fix the call sites where this not done (in mtdpart.c) and add a __must_check attribute to the prototype to avoid this kind of mistakes. Signed-off-by: Boris Brezillon <bbrezillon@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>