target: fix the exceptioin handling in target_pr_res_aptpl_metadata_store
PATCH 1/1 target: fix the exceptioin handling in target_pr_res_aptpl_metadata_store
From: tangwenji <[email protected]>
The function should exit when the i_port,isid and t_port length exceed the specified value.
Signed-off-by tangwenji <[email protected]>
--- drivers/target/target_core_configfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/target/target_core_configfs.c +3 -3
@@ -1773,7 +1773,7 @@ static ssize_t target_pr_res_aptpl_metadata_store(struct config_item *item," exceeds PR_APTPL_MAX_IPORT_LEN: %d\n" , PR_APTPL_MAX_IPORT_LEN); ret = -EINVAL ; -break ; + goto out; }break ;case Opt_initiator_sid:
@@ -1787,7 +1787,7 @@ static ssize_t target_pr_res_aptpl_metadata_store(struct config_item *item,"= exceeds PR_REG_ISID_LEN: %d\n" , PR_REG_ISID_LEN); ret = -EINVAL ; -break ; + goto out; }break ;case Opt_sa_res_key:
@@ -1851,7 +1851,7 @@ static ssize_t target_pr_res_aptpl_metadata_store(struct config_item *item," exceeds PR_APTPL_MAX_TPORT_LEN: %d\n" , PR_APTPL_MAX_TPORT_LEN); ret = -EINVAL ; -break ; + goto out; }break ;case Opt_tpgt:
Signature · 1 line
2.5.0.windows.1