mirror of
https://github.com/eclipse/upm.git
synced 2025-03-24 01:10:22 +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)
|
if(!dev)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
memset(dev, 0, sizeof(struct _apa102_context));
|
||||||
dev->leds = ledcount;
|
dev->leds = ledcount;
|
||||||
|
|
||||||
// Try to allocate and zero out buffer
|
// Try to allocate and zero out buffer
|
||||||
|
Loading…
x
Reference in New Issue
Block a user