patch 9.0.1245: code is indented more than necessary

Problem:    Code is indented more than necessary.
Solution:   Use an early return where it makes sense. (Yegappan Lakshmanan,
            closes #11879)
diff --git a/src/textprop.c b/src/textprop.c
index 241c4ae..bee45b6 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -1939,28 +1939,28 @@
     }
 
     hi = find_prop_type_hi(name, buf);
-    if (hi != NULL)
+    if (hi == NULL)
+	return;
+
+    hashtab_T	*ht;
+    proptype_T	*prop = HI2PT(hi);
+
+    if (buf == NULL)
     {
-	hashtab_T	*ht;
-	proptype_T	*prop = HI2PT(hi);
-
-	if (buf == NULL)
-	{
-	    ht = global_proptypes;
-	    VIM_CLEAR(global_proparray);
-	}
-	else
-	{
-	    ht = buf->b_proptypes;
-	    VIM_CLEAR(buf->b_proparray);
-	}
-	hash_remove(ht, hi, "prop type delete");
-	vim_free(prop);
-
-	// currently visibile text properties will disappear
-	redraw_all_later(UPD_CLEAR);
-	changed_window_setting_buf(buf == NULL ? curbuf : buf);
+	ht = global_proptypes;
+	VIM_CLEAR(global_proparray);
     }
+    else
+    {
+	ht = buf->b_proptypes;
+	VIM_CLEAR(buf->b_proparray);
+    }
+    hash_remove(ht, hi, "prop type delete");
+    vim_free(prop);
+
+    // currently visibile text properties will disappear
+    redraw_all_later(UPD_CLEAR);
+    changed_window_setting_buf(buf == NULL ? curbuf : buf);
 }
 
 /*
@@ -1982,35 +1982,36 @@
 	semsg(_(e_invalid_argument_str), "\"\"");
 	return;
     }
-    if (rettv_dict_alloc(rettv) == OK)
+
+    if (rettv_dict_alloc(rettv) == FAIL)
+	return;
+
+    proptype_T  *prop = NULL;
+    buf_T	    *buf = NULL;
+
+    if (argvars[1].v_type != VAR_UNKNOWN)
     {
-	proptype_T  *prop = NULL;
-	buf_T	    *buf = NULL;
-
-	if (argvars[1].v_type != VAR_UNKNOWN)
-	{
-	    if (get_bufnr_from_arg(&argvars[1], &buf) == FAIL)
-		return;
-	}
-
-	prop = find_prop_type(name, buf);
-	if (prop != NULL)
-	{
-	    dict_T *d = rettv->vval.v_dict;
-
-	    if (prop->pt_hl_id > 0)
-		dict_add_string(d, "highlight", syn_id2name(prop->pt_hl_id));
-	    dict_add_number(d, "priority", prop->pt_priority);
-	    dict_add_number(d, "combine",
-				   (prop->pt_flags & PT_FLAG_COMBINE) ? 1 : 0);
-	    dict_add_number(d, "start_incl",
-			    (prop->pt_flags & PT_FLAG_INS_START_INCL) ? 1 : 0);
-	    dict_add_number(d, "end_incl",
-			      (prop->pt_flags & PT_FLAG_INS_END_INCL) ? 1 : 0);
-	    if (buf != NULL)
-		dict_add_number(d, "bufnr", buf->b_fnum);
-	}
+	if (get_bufnr_from_arg(&argvars[1], &buf) == FAIL)
+	    return;
     }
+
+    prop = find_prop_type(name, buf);
+    if (prop == NULL)
+	return;
+
+    dict_T *d = rettv->vval.v_dict;
+
+    if (prop->pt_hl_id > 0)
+	dict_add_string(d, "highlight", syn_id2name(prop->pt_hl_id));
+    dict_add_number(d, "priority", prop->pt_priority);
+    dict_add_number(d, "combine",
+	    (prop->pt_flags & PT_FLAG_COMBINE) ? 1 : 0);
+    dict_add_number(d, "start_incl",
+	    (prop->pt_flags & PT_FLAG_INS_START_INCL) ? 1 : 0);
+    dict_add_number(d, "end_incl",
+	    (prop->pt_flags & PT_FLAG_INS_END_INCL) ? 1 : 0);
+    if (buf != NULL)
+	dict_add_number(d, "bufnr", buf->b_fnum);
 }
 
     static void
@@ -2040,24 +2041,24 @@
 {
     buf_T *buf = NULL;
 
-    if (rettv_list_alloc(rettv) == OK)
-    {
-	if (in_vim9script() && check_for_opt_dict_arg(argvars, 0) == FAIL)
-	    return;
+    if (rettv_list_alloc(rettv) == FAIL)
+	return;
 
-	if (argvars[0].v_type != VAR_UNKNOWN)
-	{
-	    if (get_bufnr_from_arg(&argvars[0], &buf) == FAIL)
-		return;
-	}
-	if (buf == NULL)
-	{
-	    if (global_proptypes != NULL)
-		list_types(global_proptypes, rettv->vval.v_list);
-	}
-	else if (buf->b_proptypes != NULL)
-	    list_types(buf->b_proptypes, rettv->vval.v_list);
+    if (in_vim9script() && check_for_opt_dict_arg(argvars, 0) == FAIL)
+	return;
+
+    if (argvars[0].v_type != VAR_UNKNOWN)
+    {
+	if (get_bufnr_from_arg(&argvars[0], &buf) == FAIL)
+	    return;
     }
+    if (buf == NULL)
+    {
+	if (global_proptypes != NULL)
+	    list_types(global_proptypes, rettv->vval.v_list);
+    }
+    else if (buf->b_proptypes != NULL)
+	list_types(buf->b_proptypes, rettv->vval.v_list);
 }
 
 /*