return true;
}
+static bool __init same_name(const char *a, const char *b)
+{
+ if (!a || !b)
+ return false;
+
+ return !strcmp(a, b);
+}
+
static void __init sh_pfc_check_cfg_reg(const char *drvname,
const struct pinmux_cfg_reg *cfg_reg)
{
/* Check pins */
for (i = 0; i < info->nr_pins; i++) {
for (j = 0; j < i; j++) {
- if (!strcmp(info->pins[i].name, info->pins[j].name))
+ if (same_name(info->pins[i].name, info->pins[j].name))
sh_pfc_err("pin %s/%s: name conflict\n",
info->pins[i].name,
info->pins[j].name);
}
for (j = 0; j < func->nr_groups; j++) {
for (k = 0; k < info->nr_groups; k++) {
- if (info->groups[k].name &&
- !strcmp(func->groups[j],
- info->groups[k].name)) {
+ if (same_name(func->groups[j],
+ info->groups[k].name)) {
refcnts[k]++;
break;
}