Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp2057325rwr; Fri, 21 Apr 2023 03:46:42 -0700 (PDT) X-Google-Smtp-Source: AKy350Y08ueLU7hxxllWX2Qt0X8dyZZ+fOTBOjmT+HSF8h2pGfFPK11wm6KJDsB8o78UqVkDclQE X-Received: by 2002:a17:90b:310:b0:247:6ead:d0ed with SMTP id ay16-20020a17090b031000b002476eadd0edmr4646440pjb.28.1682074002643; Fri, 21 Apr 2023 03:46:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682074002; cv=none; d=google.com; s=arc-20160816; b=jVqttietm5cQ8bPa1aZACT1+sOqHb2c146FycbUlEV5JNRa/3mXcCifTBDnxxahiE6 GyLs1UUJfe5+e/OM7bo+EK4xgKeFcA8d7dcEEedNZnYqbEF8G52K+S34gKsEyl7JM6T4 NN5mNJFj+a1ZkQo4/qKnHA5V99/zVaT6lEjeAvPxisfXpqWktl1LaC6AqN/3nHBR+sFR wGSmjKJLsVlkr+0sJUjtfhnnt9QZXp+MN9+dQBXTwzA22Wywv8GOHN/3OKBZLFKaNp/2 1ICzdpeEUvL1dHJzFpJ/L0DnvBIYwMM1e4VqmbXzGzyzMFu4w2UkBCMNzmPtaIwiWwyp SQ0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=h9MeXQGQNttAKEG/2Uafkn62wt8R8L4SBm0zKSGewls=; b=BRyMu98XNdZgGXrSSWdfLIKxvnMO0w71/cHGom3vOor/P7ocMdJeY4LgfMCDZfw00w 4qzYeEMwylq4QApIMzwWyQ3AV5LFNmCRZ6Q1ESIPWJtvPwGpuocrCIkKsy6dgYw148x/ NlTS5hSvhhHsT6dGlmVocPRwRpLAdK2cQpKkNiiCoDuKN8PmuDar59qWvkSLS0Bs5xq3 /fec8nylp/Rt7XIAutbLo7R2Eti1IzjtLlauwwfjw/C9IoO3oFyZy2vd33i2ePrU09ux NLpl6PY8n9dIZs/66oW3/pw3RT5yQXQOk9u/QuZYd88/HfVFtyZbIOaA+B/y8uXQjJpG usoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=x3ujMZWs; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k34-20020a17090a3ea500b00246b0bfcb5esi4192015pjc.144.2023.04.21.03.46.32; Fri, 21 Apr 2023 03:46:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=x3ujMZWs; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230260AbjDUKoN (ORCPT + 62 others); Fri, 21 Apr 2023 06:44:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229884AbjDUKoK (ORCPT ); Fri, 21 Apr 2023 06:44:10 -0400 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F1E73C07 for ; Fri, 21 Apr 2023 03:44:09 -0700 (PDT) Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-3f086770a50so10887865e9.2 for ; Fri, 21 Apr 2023 03:44:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682073848; x=1684665848; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=h9MeXQGQNttAKEG/2Uafkn62wt8R8L4SBm0zKSGewls=; b=x3ujMZWszN2R7Xq37gf2sInr4NEdk+/poPUHTl0m+nCFLhvdAWnAYwzzF5xF6mWRxh iGY1VEsPpB0CML7KQdPQNql1tte6dwKKXmLu5kbzYnJezKHOi45mNRzcjVwLgLl9lutX 2uoI2Wcc4hpgb05yNQwbcSVbyOveS7EBek95ek+AVrDk7WDlVK6f2aHZe+q5aRRnJCQp Kfr7BQfeM51E/Rci4nylNs7/JL5/frAQ6YX2/ua/CoKurwzQlo0910Ta5L5KeDu0bY+z QX/r00EstL044iQEHRUsoHU5uNy0c19MDwSvFmD3VvPaKFaRUqv7iC0+S0wse1SBCDpV oxjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682073848; x=1684665848; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=h9MeXQGQNttAKEG/2Uafkn62wt8R8L4SBm0zKSGewls=; b=C985Sh4JdTNqOcqstfxsjlZzRDrCojOs6Y6+NHB86Pcqwo6os80xVnMoo8SZJsPAB0 peGPP7K1txsWA/t0fdaAoSgbOB+K1tG2LUK7rYqUqWyK5TUo0ikuOphP/oFMgAw0wMVZ YYtwwo69sBN1E4AXoaHR49+VHX9vYXGWDpN3PdiV9K56pedAnoIHFGtU4ILUG3tznjXS Il5+/WZsQpPlo2m6+Q6bWohElXh3H/Cm2T5WQR+YK7DJTbtVmP+yY//Dc5Roosm78gXE t3Z0b/70a5Qn0W8FhR5lUTOzBqqVtiIrqCLkT7k+Ez31ovYLrdjDbnhMOxXP/IUEuV7i iU9g== X-Gm-Message-State: AAQBX9czU95/myNXG9LsNcS20sZpyUR5epLVjXBxp+0lyjY8jJNC0/Fi oVLXbqRvX/a1UTlWJTSyfoUwRl6s8dc9yiAcYwM= X-Received: by 2002:a1c:4b09:0:b0:3f1:8f05:3b82 with SMTP id y9-20020a1c4b09000000b003f18f053b82mr1443312wma.38.1682073848113; Fri, 21 Apr 2023 03:44:08 -0700 (PDT) Received: from localhost ([102.36.222.112]) by smtp.gmail.com with ESMTPSA id o2-20020a05600c4fc200b003f1738e64c0sm7906521wmq.20.2023.04.21.03.44.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Apr 2023 03:44:07 -0700 (PDT) Date: Fri, 21 Apr 2023 13:44:04 +0300 From: Dan Carpenter To: Ping-Ke Shih Cc: Kalle Valo , linux-wireless@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH] wifi: rtw89: fix rtw89_read_chip_ver() for RTL8852B and RTL8851B Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Mailer: git-send-email haha only kidding X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org The if statement is reversed so it will not record the chip version. This was detected using Smatch: drivers/net/wireless/realtek/rtw89/core.c:3593 rtw89_read_chip_ver() error: uninitialized symbol 'val'. Fixes: a6fb2bb84654 ("wifi: rtw89: read version of analog hardware") Signed-off-by: Dan Carpenter --- drivers/net/wireless/realtek/rtw89/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/realtek/rtw89/core.c b/drivers/net/wireless/realtek/rtw89/core.c index 7fc0a26a4d73..1d462c9e46d9 100644 --- a/drivers/net/wireless/realtek/rtw89/core.c +++ b/drivers/net/wireless/realtek/rtw89/core.c @@ -3587,7 +3587,7 @@ static void rtw89_read_chip_ver(struct rtw89_dev *rtwdev) if (chip->chip_id == RTL8852B || chip->chip_id == RTL8851B) { ret = rtw89_mac_read_xtal_si(rtwdev, XTAL_SI_CV, &val); - if (!ret) + if (ret) return; rtwdev->hal.acv = u8_get_bits(val, XTAL_SI_ACV_MASK); -- 2.39.2