]> Git Repo - linux.git/commit - drivers/mtd/mtdcore.c
mtd: Initialize ->fail_addr early in mtd_erase()
authorBoris Brezillon <[email protected]>
Mon, 12 Feb 2018 21:03:07 +0000 (22:03 +0100)
committerBoris Brezillon <[email protected]>
Thu, 15 Mar 2018 16:25:05 +0000 (17:25 +0100)
commitc585da9f5f6186739f0b123b8a5b6353e425f51b
treeb264d83d56b70e66a28f74ce83f1c4d18fc76813
parentf0a37a8db81ea9c7034e0fff4a430b221019fc50
mtd: Initialize ->fail_addr early in mtd_erase()

mtd_erase() can return an error before ->fail_addr is initialized to
MTD_FAIL_ADDR_UNKNOWN. Move this initialization at the very beginning
of the function.

Signed-off-by: Boris Brezillon <[email protected]>
Reviewed-by: Richard Weinberger <[email protected]>
drivers/mtd/mtdcore.c
This page took 0.049825 seconds and 4 git commands to generate.