irqdomain: Use return value of strreplace()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 28 Jun 2023 15:02:51 +0000 (18:02 +0300)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 30 Jun 2023 09:13:44 +0000 (11:13 +0200)
Since strreplace() returns the pointer to the string itself, use it
directly.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20230628150251.17832-1-andriy.shevchenko@linux.intel.com
kernel/irq/irqdomain.c

index 5bd0162..0bdef4f 100644 (file)
@@ -182,9 +182,7 @@ static struct irq_domain *__irq_domain_create(struct fwnode_handle *fwnode,
                        return NULL;
                }
 
-               strreplace(name, '/', ':');
-
-               domain->name = name;
+               domain->name = strreplace(name, '/', ':');
                domain->fwnode = fwnode;
                domain->flags |= IRQ_DOMAIN_NAME_ALLOCATED;
        }