diff options
author | Archit Taneja <architt@codeaurora.org> | 2016-11-17 01:42:03 -0500 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2016-11-27 11:35:07 -0500 |
commit | d8dd80526c9097bd60464982a011150b1b213d06 (patch) | |
tree | 7a0d6c75f0c6af2c66d692d068d7083a14558a41 | |
parent | 9708ebbe1728e532a39e2acda868b3f8e892c512 (diff) |
drm/msm: Remove bad calls to of_node_put()
In add_components_mdp, we parse the endpoints in MDP output ports
using the helper for_each_endpoint_of_node(). Our function calls
of_node_put() on the endpoint node before we iterate over the
next one. This is already done by the helper, and results in
trying to decrement the refcount twice.
Remove the extra of_node_put calls. This fixes warnings seen when
we try to insert the driver as a module on IFC6410.
Reported-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
-rw-r--r-- | drivers/gpu/drm/msm/msm_drv.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c index aa41d8dd623b..a2cc990bc7c2 100644 --- a/drivers/gpu/drm/msm/msm_drv.c +++ b/drivers/gpu/drm/msm/msm_drv.c | |||
@@ -911,10 +911,8 @@ static int add_components_mdp(struct device *mdp_dev, | |||
911 | * remote-endpoint isn't a component that we need to add | 911 | * remote-endpoint isn't a component that we need to add |
912 | */ | 912 | */ |
913 | if (of_device_is_compatible(np, "qcom,mdp4") && | 913 | if (of_device_is_compatible(np, "qcom,mdp4") && |
914 | ep.port == 0) { | 914 | ep.port == 0) |
915 | of_node_put(ep_node); | ||
916 | continue; | 915 | continue; |
917 | } | ||
918 | 916 | ||
919 | /* | 917 | /* |
920 | * It's okay if some of the ports don't have a remote endpoint | 918 | * It's okay if some of the ports don't have a remote endpoint |
@@ -922,15 +920,12 @@ static int add_components_mdp(struct device *mdp_dev, | |||
922 | * any external interface. | 920 | * any external interface. |
923 | */ | 921 | */ |
924 | intf = of_graph_get_remote_port_parent(ep_node); | 922 | intf = of_graph_get_remote_port_parent(ep_node); |
925 | if (!intf) { | 923 | if (!intf) |
926 | of_node_put(ep_node); | ||
927 | continue; | 924 | continue; |
928 | } | ||
929 | 925 | ||
930 | drm_of_component_match_add(master_dev, matchptr, compare_of, | 926 | drm_of_component_match_add(master_dev, matchptr, compare_of, |
931 | intf); | 927 | intf); |
932 | of_node_put(intf); | 928 | of_node_put(intf); |
933 | of_node_put(ep_node); | ||
934 | } | 929 | } |
935 | 930 | ||
936 | return 0; | 931 | return 0; |