From: Tony Prisk Date: Wed, 3 Apr 2013 04:57:11 +0000 (+1300) Subject: of: Remove duplicated code for validating property and value X-Git-Tag: omap-for-v3.10/fixes-for-merge-window~5^2~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=daeec1f083e02c9ee235e29d2cb28d7b9e81d899;p=pandora-kernel.git of: Remove duplicated code for validating property and value Several functions in of/base.c have the same code duplicated for finding and validating a property and value. struct property *prop = of_find_property(np, propname, NULL); if (!prop) return -EINVAL; if (!prop->value) return -ENODATA; if ( > prop->length) return -EOVERFLOW; This patch adds of_find_property_value_of_size() which performs the equivalent of the above code and removes the instances where it was duplicated in several functions. Reported-by: Rob Herring Signed-off-by: Tony Prisk Acked-by: Linus Walleij Acked-by: Rob Herring --- Reading git-diff-tree failed