Skip to content
Permalink
Browse files

drivers: modem: wncm14a2a: correct pinconfig assert check

Assert is checking the array size of pinconfig.  Not the actual
size of the structure.

Fixes issue reported by Github User @weinholtendian

Signed-off-by: Michael Scott <mike@foundries.io>
  • Loading branch information...
mike-scott authored and nashif committed May 17, 2019
1 parent d8f8f0f commit bd2d03923e470132027244de6a20c5f36ad6a6c7
Showing with 1 addition and 1 deletion.
  1. +1 −1 drivers/modem/wncm14a2a.c
@@ -1426,7 +1426,7 @@ static int wncm14a2a_init(struct device *dev)
ARG_UNUSED(dev);

/* check for valid pinconfig */
__ASSERT(sizeof(pinconfig) == MAX_MDM_CONTROL_PINS,
__ASSERT(ARRAY_SIZE(pinconfig) == MAX_MDM_CONTROL_PINS,
"Incorrect modem pinconfig!");

(void)memset(&ictx, 0, sizeof(ictx));

0 comments on commit bd2d039

Please sign in to comment.
You can’t perform that action at this time.