Skip to content

Commit 6a546d1

Browse files
ioannisggalak
authored andcommitted
drivers: usb: nrfx: initialize local struct to zero
Initialize a local struct variable to zero, to suppress un-initialized variable error. Fixes #14422. Signed-off-by: Ioannis Glaropoulos <[email protected]>
1 parent 239e397 commit 6a546d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/usb/device/usb_dc_nrfx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1115,7 +1115,7 @@ static void usbd_event_transfer_data(nrfx_usbd_evt_t const *const p_event)
11151115
static void usbd_event_handler(nrfx_usbd_evt_t const *const p_event)
11161116
{
11171117
struct nrf_usbd_ep_ctx *ep_ctx;
1118-
struct usbd_event evt;
1118+
struct usbd_event evt = {0};
11191119
bool put_evt = false;
11201120

11211121
switch (p_event->type) {

0 commit comments

Comments
 (0)