projects
/
oweals
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3911b19
)
fpga: altera: cyclon2: Check function pointer before calling
author
Alexander Dahl
<ada@thorsis.com>
Fri, 28 Jun 2019 12:41:23 +0000
(14:41 +0200)
committer
Michal Simek
<michal.simek@xilinx.com>
Tue, 30 Jul 2019 08:21:15 +0000
(10:21 +0200)
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>
drivers/fpga/cyclon2.c
patch
|
blob
|
history
diff --git
a/drivers/fpga/cyclon2.c
b/drivers/fpga/cyclon2.c
index ab979b017a2628a32fc7d3522a6bb89639223f8f..c929cd2cc51863a77323102ddaf9561f2494a8c7 100644
(file)
--- a/
drivers/fpga/cyclon2.c
+++ b/
drivers/fpga/cyclon2.c
@@
-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__);
}