mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-24 21:54:01 +00:00
fpga: altera: cyclon2: Check function pointer before calling
As already done for the 'pre' function, a check is added to not follow a NULL pointer, if somebody has not assigned a 'post' function. Signed-off-by: Alexander Dahl <ada@thorsis.com>
This commit is contained in:
parent
3911b19cac
commit
b283d6ba67
1 changed files with 5 additions and 1 deletions
|
@ -183,8 +183,12 @@ static int CYC2_ps_load(Altera_desc *desc, const void *buf, size_t bsize)
|
|||
else
|
||||
puts("Fail.\n");
|
||||
#endif
|
||||
(*fn->post) (cookie);
|
||||
|
||||
/*
|
||||
* Run the post configuration function if there is one.
|
||||
*/
|
||||
if (*fn->post)
|
||||
(*fn->post) (cookie);
|
||||
} else {
|
||||
printf("%s: NULL Interface function table!\n", __func__);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue