From 7a6de0ddde88415d9b1eb7a308c0509a1285fd2f Mon Sep 17 00:00:00 2001 From: Konstantin Makariev Date: Thu, 27 May 2021 12:08:51 -0500 Subject: [PATCH] bos0614_mmi: fix alignment issue Structure alignment and missing data initialization allowed for improperly populated value. Change-Id: Iab8c395452db159415cf3052e7a7590770d8ae5f Signed-off-by: Konstantin Makariev Reviewed-on: https://gerrit.mot.com/1962683 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Ling Jin Submit-Approved: Jira Key --- drivers/input/misc/bos0614_mmi/bosDriver.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/input/misc/bos0614_mmi/bosDriver.c b/drivers/input/misc/bos0614_mmi/bosDriver.c index 53b23ed87765..725d9704b98a 100644 --- a/drivers/input/misc/bos0614_mmi/bosDriver.c +++ b/drivers/input/misc/bos0614_mmi/bosDriver.c @@ -294,7 +294,7 @@ static ssize_t setSynthSlice(struct device *dev, if (ctx != NULL && ctx->hapticDriver != NULL) { HapticDriver *driver = ctx->hapticDriver; - SynthSlice slice; + SynthSlice slice = {0}; uint8_t outputChannel = 0; size_t paramLength = 0; uint8_t shape = 0; @@ -470,7 +470,7 @@ static ssize_t setSensingConfig(struct device *dev, if (ctx != NULL && ctx->hapticDriver != NULL) { HapticDriver *driver = ctx->hapticDriver; - SensingConfig config; + SensingConfig config = {0}; ChannelId channelId = 0; size_t paramLength = 0; const char *directionS; @@ -497,7 +497,7 @@ static ssize_t setSensingConfig(struct device *dev, if (directionS != NULL && modeS != NULL && driver->buttonSensing(driver, channelId, config) && - ctx->hapticDriver->configGPO(ctx->hapticDriver, channelId, GPO_BUTTON_STATE)) + driver->configGPO(driver, channelId, GPO_BUTTON_STATE)) { dev_dbg(ctx->dev, "[Sensing config] Success Channel #: %d Mode: %s Direction: %s Debouncing Duration: %d microS Threshold: %d Stabilization Duration: %d ms\n",