diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2021-12-23 15:56:20 +0100 |
---|---|---|
committer | Geert Uytterhoeven <geert+renesas@glider.be> | 2022-02-22 09:57:19 +0100 |
commit | 27b32fbb28247b7fdb2cdd7ab86898f1b382061c (patch) | |
tree | 361b8dfce9749b6e276b5dd4eb3365745ed7c164 /drivers/pinctrl | |
parent | 410ba4ad214add7843f76ebd4b2f4d3fc6931ea5 (diff) | |
download | linux-27b32fbb28247b7fdb2cdd7ab86898f1b382061c.tar.gz linux-27b32fbb28247b7fdb2cdd7ab86898f1b382061c.tar.bz2 linux-27b32fbb28247b7fdb2cdd7ab86898f1b382061c.zip |
pinctrl: renesas: checker: Simplify same_name()
Simplify the helper that checks if two strings are valid and identical.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/509c70041bcf4302e284758abe1fd8165644b505.1640270559.git.geert+renesas@glider.be
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r-- | drivers/pinctrl/renesas/core.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/pinctrl/renesas/core.c b/drivers/pinctrl/renesas/core.c index 0d4ea2e22a53..5c0a62127062 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) |