From: Lee Jones Date: Tue, 7 Jul 2015 15:06:53 +0000 (+0100) Subject: regulator: pwm-regulator: Don't assign structure attributes right away X-Git-Tag: omap-for-v4.3/fixes-merge-window~34^2~2^6~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ad2cb14f5b8f3cb3d8688115037751b1ff45455;p=pandora-kernel.git regulator: pwm-regulator: Don't assign structure attributes right away Perhaps this is just personal preference, but ... This patch introduces a new local variable to receive and test regulator initialisation data. It simplifies and cleans up the code making it that little bit easier to read and maintain. The local value is assigned to the structure attribute when all the others are. This is the way we usually do things. Prevents this kind of nonsense: this->is->just.silly = fetch_silly_value(&pointer); if (!this->is->just.silly) { printk("Silly value failed: %d\n", this->is->just.silly); return this->is->just.silly; } Signed-off-by: Lee Jones Signed-off-by: Mark Brown --- Reading git-diff-tree failed