diff options
| author | Thomas Gleixner <[email protected]> | 2017-06-20 01:37:04 +0200 |
|---|---|---|
| committer | Thomas Gleixner <[email protected]> | 2017-06-22 18:21:08 +0200 |
| commit | 0165308a2f994939d2e1b36624f5a8f57746bc88 (patch) | |
| tree | 027fee7d5a4cc1dd8dc9f6d0487df3108d457073 /kernel | |
| parent | 1bb3a5a76386ba2886ee44b903eeff5765bd71d4 (diff) | |
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 <[email protected]>
Acked-by: Marc Zyngier <[email protected]>
Cc: Jens Axboe <[email protected]>
Cc: Michael Ellerman <[email protected]>
Cc: Keith Busch <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/irq/msi.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; |