From: Philipp Hahn Date: Tue, 10 Mar 2026 11:49:07 +0000 (+0100) Subject: pinctrl: Prefer IS_ERR_OR_NULL over manual NULL check X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b7fff045a9f8d15d78ae3206ab393f55bf9c383d;p=thirdparty%2Flinux.git pinctrl: Prefer IS_ERR_OR_NULL over manual NULL check Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL check. Change generated with coccinelle. To: Linus Walleij Cc: linux-gpio@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Philipp Hahn Signed-off-by: Linus Walleij --- diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c index 2edc9bdad183..254161d52da7 100644 --- a/drivers/pinctrl/core.c +++ b/drivers/pinctrl/core.c @@ -1992,7 +1992,7 @@ static void pinctrl_init_device_debugfs(struct pinctrl_dev *pctldev) device_root = debugfs_create_dir(debugfs_name, debugfs_root); pctldev->device_root = device_root; - if (IS_ERR(device_root) || !device_root) { + if (IS_ERR_OR_NULL(device_root)) { pr_warn("failed to create debugfs directory for %s\n", dev_name(pctldev->dev)); return;