mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-28 10:01:32 +00:00
x86: Do sanity test on pirq table before writing
If pirq_routing_table points to NULL, that means U-Boot fails to generate the table before in create_pirq_routing_table(), so we test it against NULL before actually writing it. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
05b98ec346
commit
67b24970ce
1 changed files with 3 additions and 0 deletions
|
@ -209,5 +209,8 @@ void pirq_init(void)
|
||||||
|
|
||||||
u32 write_pirq_routing_table(u32 addr)
|
u32 write_pirq_routing_table(u32 addr)
|
||||||
{
|
{
|
||||||
|
if (!pirq_routing_table)
|
||||||
|
return addr;
|
||||||
|
|
||||||
return copy_pirq_routing_table(addr, pirq_routing_table);
|
return copy_pirq_routing_table(addr, pirq_routing_table);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue