Skip to content

Commit

Permalink
genirq/msi: Prevent overwriting domain name
Browse files Browse the repository at this point in the history
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 <tglx@linutronix.de>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Keith Busch <keith.busch@intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Christoph Hellwig <hch@lst.de>
Link: http://lkml.kernel.org/r/20170619235443.510684976@linutronix.de
  • Loading branch information
Thomas Gleixner committed Jun 22, 2017
1 parent 1bb3a5a commit 0165308
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kernel/irq/msi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0165308

Please sign in to comment.