From: Tyrel Datwyler Date: Thu, 15 Aug 2013 05:23:45 +0000 (-0700) Subject: powerpc/pseries: Fix creation of loop in device node property list X-Git-Tag: firefly_0821_release~176^2~5411^2~16 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d8e533b45fd98aa72957d9580d97aa0ab45265ad;p=firefly-linux-kernel-4.4.55.git powerpc/pseries: Fix creation of loop in device node property list The update_dt_prop helper function fails to set the IN/OUT parameter prop to NULL after a complete property has been parsed from the work area returned by the ibm,update-properties rtas function. This results in the property list of the device node being updated is corrupted and becomes a loop since the same property structure is used repeatedly. Signed-off-by: Tyrel Datwyler Acked-by: Nathan Fontenot Signed-off-by: Benjamin Herrenschmidt --- diff --git a/arch/powerpc/platforms/pseries/mobility.c b/arch/powerpc/platforms/pseries/mobility.c index 3d01eee9ffb1..f28abeeecbd5 100644 --- a/arch/powerpc/platforms/pseries/mobility.c +++ b/arch/powerpc/platforms/pseries/mobility.c @@ -119,7 +119,7 @@ static int update_dt_property(struct device_node *dn, struct property **prop, if (!more) { of_update_property(dn, new_prop); - new_prop = NULL; + *prop = NULL; } return 0;