]> git.baikalelectronics.ru Git - kernel.git/commit
staging: android: ion: Avoid NULL point in error path
authorYisheng Xie <xieyisheng1@huawei.com>
Mon, 12 Feb 2018 10:43:09 +0000 (18:43 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Feb 2018 16:29:07 +0000 (17:29 +0100)
commit1a1d328277bd1ed1c02075f5d4433159ffe829db
treeb86034432abea8c7594bc6695895b9a336cf5c9c
parentf6b921d3f94b8369e754b044e779848e59683948
staging: android: ion: Avoid NULL point in error path

If we failed to create debugfs for ion at ion_device_create, the
debug_root of ion_device will be NULL, and then when try to create debug
file for shrinker of heap it will be create on the top of debugfs. If we
also failed to create this the debug file, it call dentry_path to found
the path of debug_root, then a NULL point will occur.

Fix this by avoiding call dentry_path, but show the debug name only when
failed to create debug file for shrinker.

Acked-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/android/ion/ion.c