Commit 0a01aec2 authored by R Sundar's avatar R Sundar Committed by Greg Kroah-Hartman

usb: typec: nb7vpq904m: Remove unneeded indentation

In function nb7vpq904m_parse_data_lanes_mapping(), the "if (ep)"
condition is basically the entire function. Making the code a bit more
readable by inverting the condition so that the function returns
immediately if there is no "ep".
Signed-off-by: default avatarR Sundar <prosunofficial@gmail.com>
Link: https://lore.kernel.org/r/20240506162829.5223-1-prosunofficial@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c3f38fa6
......@@ -321,7 +321,10 @@ static int nb7vpq904m_parse_data_lanes_mapping(struct nb7vpq904m *nb7)
ep = of_graph_get_endpoint_by_regs(nb7->client->dev.of_node, 1, 0);
if (ep) {
if (!ep)
return 0;
ret = of_property_count_u32_elems(ep, "data-lanes");
if (ret == -EINVAL)
/* Property isn't here, consider default mapping */
......@@ -361,7 +364,6 @@ static int nb7vpq904m_parse_data_lanes_mapping(struct nb7vpq904m *nb7)
ret = -EINVAL;
goto out_error;
}
}
out_done:
ret = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment