Skip to content

Commit 0165308

Browse files
committed
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]
1 parent 1bb3a5a commit 0165308

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

kernel/irq/msi.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,8 @@ struct irq_domain *msi_create_irq_domain(struct fwnode_handle *fwnode,
274274

275275
domain = irq_domain_create_hierarchy(parent, IRQ_DOMAIN_FLAG_MSI, 0,
276276
fwnode, &msi_domain_ops, info);
277-
if (domain && info->chip && info->chip->name)
277+
278+
if (domain && !domain->name && info->chip)
278279
domain->name = info->chip->name;
279280

280281
return domain;

0 commit comments

Comments
 (0)