tcmu: return on first Opt parse failure
authorMike Christie <mchristi@redhat.com>
Thu, 2 Mar 2017 05:14:40 +0000 (23:14 -0600)
committerNicholas Bellinger <nab@linux-iscsi.org>
Sat, 18 Mar 2017 21:47:25 +0000 (14:47 -0700)
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 <mchristi@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_user.c

index 24e8580f07b8eccdb32128bcdcadefa43e88f5ac..4339ab2133b38072025d5d9384337c1d0039649b 100644 (file)
@@ -1118,6 +1118,9 @@ static ssize_t tcmu_set_configfs_dev_params(struct se_device *dev,
                default:
                        break;
                }
+
+               if (ret)
+                       break;
        }
 
        kfree(orig);