From: Geert Uytterhoeven Date: Thu, 23 Dec 2021 14:56:20 +0000 (+0100) Subject: pinctrl: renesas: checker: Simplify same_name() X-Git-Tag: v5.18-rc1~84^2~53^2~20 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=27b32fbb28247b7fdb2cdd7ab86898f1b382061c;p=thirdparty%2Flinux.git pinctrl: renesas: checker: Simplify same_name() Simplify the helper that checks if two strings are valid and identical. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/509c70041bcf4302e284758abe1fd8165644b505.1640270559.git.geert+renesas@glider.be --- diff --git a/drivers/pinctrl/renesas/core.c b/drivers/pinctrl/renesas/core.c index 0d4ea2e22a535..5c0a621270627 100644 --- a/drivers/pinctrl/renesas/core.c +++ b/drivers/pinctrl/renesas/core.c @@ -777,10 +777,7 @@ static bool __init is0s(const u16 *enum_ids, unsigned int n) static bool __init same_name(const char *a, const char *b) { - if (!a || !b) - return false; - - return !strcmp(a, b); + return a && b && !strcmp(a, b); } static void __init sh_pfc_check_reg(const char *drvname, u32 reg, u32 bits)