From: Viresh Kumar Date: Wed, 12 Aug 2015 11:00:18 +0000 (+0530) Subject: PM / OPP: Free resources and properly return error on failure X-Git-Tag: omap-for-v4.3/fixes-rc1~121^2~3^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1f821ed7afaa7ed689322ee2369f270e374a6350;p=pandora-kernel.git PM / OPP: Free resources and properly return error on failure _of_init_opp_table_v2() isn't freeing up resources on some errors and the error values returned are also not correct always. This fixes following problems: - Return -ENOENT, if no entries are found in the table. - Use IS_ERR() to properly check return value of _find_device_opp(). - Return error value with PTR_ERR() in above case. - Free table if _find_device_opp() fails. Reported-by: Dan Carpenter Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki --- Reading git-diff-tree failed