]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/pseries: handle nodes without '/'
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 1 Oct 2015 09:46:09 +0000 (12:46 +0300)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 5 Oct 2015 10:11:27 +0000 (21:11 +1100)
commit5ff4b57f37b44514655074ddff1303647dfce240
tree830a62cc1791d48c974fc47d9c60345316dcf2c1
parent1a54632f3a9b1923d17f6d7cd3d05c7415456f3f
powerpc/pseries: handle nodes without '/'

In case we have node without '/' strrchr() returns NULL which might lead to
crash. Replace strrchr() by kbasename() and modify condition to avoid such
behaviour.

Suggested-by: Segher Boessenkool <segher@kernel.crashing.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/pseries/of_helpers.c