mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-28 02:35:28 +00:00
tcpm/anx74xx: initialize reg variable before use
When disabling auto_good_crc, the reg variable was being used without initialization. Mirror the code for enabling auto_good_crc to set the variable. TEST=Booted reef with updated code. BUG=None BRANCH=None Change-Id: Ie552f2ff74df05750bd65b6344d8a80cc285f8b0 Signed-off-by: Martin Roth <martinroth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/368221 Reviewed-by: David Hendricks <dhendrix@chromium.org>
This commit is contained in:
@@ -44,6 +44,8 @@ static void anx74xx_tcpm_set_auto_good_crc(int port, int enable)
|
||||
tcpc_read(port, ANX74XX_REG_TX_AUTO_GOODCRC_1, ®);
|
||||
reg |= ANX74XX_REG_AUTO_GOODCRC_EN;
|
||||
} else {
|
||||
/* Clear bit-0 for disable */
|
||||
tcpc_read(port, ANX74XX_REG_TX_AUTO_GOODCRC_1, ®);
|
||||
reg &= ~ANX74XX_REG_AUTO_GOODCRC_EN;
|
||||
tcpc_write(port, ANX74XX_REG_TX_AUTO_GOODCRC_2, 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user