Skip to content
Commit 29d049be authored by Sebastian Andrzej Siewior's avatar Sebastian Andrzej Siewior Committed by Joerg Roedel
Browse files

iommu/amd: Return proper error code in irq_remapping_alloc()



In the unlikely case when alloc_irq_table() is not able to return a
remap table then "ret" will be assigned with an error code. Later, the
code checks `index' and if it is negative (which it is because it is
initialized with `-1') and then then function properly aborts but
returns `-1' instead `-ENOMEM' what was intended.
In order to correct this, I assign -ENOMEM to index.

Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent 2cd1083d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment