From: Mike Christie Date: Thu, 2 Mar 2017 05:14:40 +0000 (-0600) Subject: tcmu: return on first Opt parse failure X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2579325ca0acc598fdf41ba12b2871d3467f28df;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git tcmu: return on first Opt parse failure We only were returing failure if the last opt to be parsed failed. This has a return failure when we first detect a failure. Signed-off-by: Mike Christie Signed-off-by: Nicholas Bellinger --- diff --git a/drivers/target/target_core_user.c b/drivers/target/target_core_user.c index 24e8580f07b8..4339ab2133b3 100644 --- a/drivers/target/target_core_user.c +++ b/drivers/target/target_core_user.c @@ -1118,6 +1118,9 @@ static ssize_t tcmu_set_configfs_dev_params(struct se_device *dev, default: break; } + + if (ret) + break; } kfree(orig);