From: Thomas Gleixner Date: Mon, 19 Jun 2017 23:37:04 +0000 (+0200) Subject: genirq/msi: Prevent overwriting domain name X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0165308a2f994939d2e1b36624f5a8f57746bc88;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git genirq/msi: Prevent overwriting domain name Prevent overwriting an already assigned domain name. Remove the extra check for chip->name, because if domain->name is NULL overwriting it with NULL is not a problem. Signed-off-by: Thomas Gleixner Acked-by: Marc Zyngier Cc: Jens Axboe Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235443.510684976@linutronix.de --- diff --git a/kernel/irq/msi.c b/kernel/irq/msi.c index fe4d48ec5bc4..9e3f1857c6bd 100644 --- a/kernel/irq/msi.c +++ b/kernel/irq/msi.c @@ -274,7 +274,8 @@ struct irq_domain *msi_create_irq_domain(struct fwnode_handle *fwnode, domain = irq_domain_create_hierarchy(parent, IRQ_DOMAIN_FLAG_MSI, 0, fwnode, &msi_domain_ops, info); - if (domain && info->chip && info->chip->name) + + if (domain && !domain->name && info->chip) domain->name = info->chip->name; return domain;