]> git.ipfire.org Git - thirdparty/linux.git/commit
irqdomain: Make __irq_domain_create() return an error code
authorHerve Codina <herve.codina@bootlin.com>
Fri, 14 Jun 2024 17:32:11 +0000 (19:32 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 17 Jun 2024 13:48:13 +0000 (15:48 +0200)
commit80f6abe0d39bc6ccf353290067ff589653ff922c
treed903c29d5ded98800daf7bc028dc05a2e7fc5c51
parentb986055dd04141efd6d5dcdacd48d6b38cf320c8
irqdomain: Make __irq_domain_create() return an error code

__irq_domain_create() can fail for several reasons. When it fails it
returns a NULL pointer and so filters out the exact failure reason.
The only user of __irq_domain_create() is irq_domain_instantiate() which
can return a PTR_ERR value. On __irq_domain_create() failure, it uses an
arbitrary error code.

Rather than using this arbitrary error value, make __irq_domain_create()
return is own error code and use that one.

[ tglx: Remove the pointless ERR_CAST. domain is a valid return pointer ]

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20240614173232.1184015-11-herve.codina@bootlin.com
kernel/irq/irqdomain.c