From: Colin Ian King Date: Mon, 16 Mar 2015 20:14:02 +0000 (-0400) Subject: arch: tile: fix null pointer dereference on pt_regs pointer X-Git-Tag: omap-for-v4.1/fixes-rc1~110^2~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9088616fb3c4e0d3ec4efb20378691066a218f9c;p=pandora-kernel.git arch: tile: fix null pointer dereference on pt_regs pointer Cppcheck reports the following issue: [arch/tile/kernel/stack.c:116]: (error) Possible null pointer dereference: p In this case, on reporting on an odd fault, p is set to NULL and immediately afterwords p is dereferenced iff !kbt->profile is false. Rather than doing this check just return NULL rather than falling through to the potential null pointer dereference (since the original intentional outcome would be to return NULL anyhow) for this odd fault case. Signed-off-by: Colin Ian King Signed-off-by: Chris Metcalf [tweaked lightly] --- Reading git-diff-tree failed