]> www.infradead.org Git - users/dwmw2/linux.git/commit
platform/olpc: Remove redundant null pointer checks in olpc_ec_setup_debugfs()
authorLi Zetao <lizetao1@huawei.com>
Sat, 7 Sep 2024 03:09:59 +0000 (11:09 +0800)
committerHans de Goede <hdegoede@redhat.com>
Wed, 11 Sep 2024 12:20:01 +0000 (14:20 +0200)
commitf80d7100f091e96b54beb32dc6d136520453582f
tree90d05368ed493c28fa1659a87e0c3a50be25064d
parentcedf233530cc375343c5a0b612fe94392f246c99
platform/olpc: Remove redundant null pointer checks in olpc_ec_setup_debugfs()

Since the debugfs_create_dir() never returns a null pointer, checking
the return value for a null pointer is redundant. Since
debugfs_create_file() can deal with a ERR_PTR() style pointer, drop
the check.

Signed-off-by: Li Zetao <lizetao1@huawei.com>
Link: https://lore.kernel.org/r/20240907031009.3591057-2-lizetao1@huawei.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/olpc/olpc-ec.c