remove redundant nested `if err != nil` checks Signed-off-by: Kyori Sakao <system.222.down@gmail.com>