andrzej-kaczmarek closed pull request #1578: hw/drivers/lp5523: Fix write 
payload length
URL: https://github.com/apache/mynewt-core/pull/1578
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/hw/drivers/led/lp5523/src/lp5523.c 
b/hw/drivers/led/lp5523/src/lp5523.c
index 99847916ae..3d8dcce285 100644
--- a/hw/drivers/led/lp5523/src/lp5523.c
+++ b/hw/drivers/led/lp5523/src/lp5523.c
@@ -147,7 +147,7 @@ lp5523_set_n_regs(struct led_itf *itf, enum 
lp5523_registers addr,
     memcpy(&payload[1], vals, len);
 
 #if MYNEWT_VAL(BUS_DRIVER_PRESENT)
-    rc = bus_node_simple_write(itf->li_dev, payload, sizeof(payload));
+    rc = bus_node_simple_write(itf->li_dev, payload, len + 1);
 #else
     struct hal_i2c_master_data data_struct = {
         .address = itf->li_addr,


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to