diff --git a/embed/trezorhal/sdcard.c b/embed/trezorhal/sdcard.c index 78606772b..10e0979cb 100644 --- a/embed/trezorhal/sdcard.c +++ b/embed/trezorhal/sdcard.c @@ -151,7 +151,7 @@ error: } void sdcard_power_off(void) { - if (sd_handle.Instance != NULL) { + if (sd_handle.Instance) { HAL_SD_DeInit(&sd_handle); sd_handle.Instance = NULL; } diff --git a/embed/trezorhal/touch.c b/embed/trezorhal/touch.c index be562995e..25cf616e6 100644 --- a/embed/trezorhal/touch.c +++ b/embed/trezorhal/touch.c @@ -144,7 +144,7 @@ void touch_power_on(void) { } void touch_power_off(void) { - if (i2c_handle.Instance != NULL) { + if (i2c_handle.Instance) { HAL_I2C_DeInit(&i2c_handle); i2c_handle.Instance = NULL; }