nand command: fix null pointer when adding/deleting a bb device
Commit 40ee300 introduces info option about bad blocks. The open()
function call is therefore moved out from mark good/bad block to use the
filedescriptor in info option too. If someone tries to add/delete a bb device
the optind variable is incremented and the open() call gets a null pointer.
Fix this issue by returning when the bb device is added/deleted.

Signed-off-by: Oleg Karfich <oleg.karfich@wago.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 0f3782d commit a55c7090e783ad6cba78722bf34cb36b3ccff3eb
@Oleg.Karfich@wago.com Oleg.Karfich@wago.com authored on 15 Aug 2018
Sascha Hauer committed on 17 Aug 2018
Showing 1 changed file
View
commands/nand.c