From: Lars-Peter Clausen Date: Mon, 14 Nov 2011 09:40:15 +0000 (+0100) Subject: regmap: return ERR_PTR instead of NULL in regmap_init X-Git-Tag: v3.3-rc1~163^2~25 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=abbb18fb4ad7472ee2e1351f0ca12bce64cac143;p=pandora-kernel.git regmap: return ERR_PTR instead of NULL in regmap_init The regmap_init documentation states that it will either return a pointer to a valid regmap structure or a ERR_PTR in case of an error. Currently it returns a NULL pointer in case no bus or no config was given. Since NULL is not a ERR_PTR a caller might assume that it is a pointer to a valid regmap structure, so return a ERR_PTR(-EINVAL) instead. Signed-off-by: Lars-Peter Clausen Signed-off-by: Mark Brown --- Reading git-diff-tree failed