mirror of
https://github.com/eclipse/upm.git
synced 2025-03-15 04:57:30 +03:00
apa102: fix potential reference of uninitialized memory
Signed-off-by: Jon Trulson <jtrulson@ics.com>
This commit is contained in:
parent
d9850cf0f6
commit
092f84437f
@ -34,6 +34,7 @@ apa102_context apa102_init(int ledcount, int bus, int cs) {
|
||||
if(!dev)
|
||||
return NULL;
|
||||
|
||||
memset(dev, 0, sizeof(struct _apa102_context));
|
||||
dev->leds = ledcount;
|
||||
|
||||
// Try to allocate and zero out buffer
|
||||
|
Loading…
x
Reference in New Issue
Block a user