From 6021a5eb6f697d22868ce64ac989282d5c57ce48 Mon Sep 17 00:00:00 2001 From: rusefillc <48498823+rusefillc@users.noreply.github.com> Date: Wed, 7 Jun 2023 03:07:44 -0400 Subject: [PATCH] max3185x: fix compilation warning (#264) (cherry picked from commit 083defaaf2dd20498939ca5ddd40195a2484c33b) Co-authored-by: Andrey Gusakov --- firmware/max3185x.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/firmware/max3185x.cpp b/firmware/max3185x.cpp index cf8cc7d..0e13d48 100644 --- a/firmware/max3185x.cpp +++ b/firmware/max3185x.cpp @@ -89,6 +89,8 @@ int Max3185x::detect() uint32_t data; int ret = spi_txrx(tx, rx, 4); + if (ret) + return ret; data = (rx[0] << 24) | (rx[1] << 16) | (rx[2] << 8) |