Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp660212pxb; Tue, 5 Apr 2022 17:42:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyMB+k3pW4VYdija6u+pPxEdGZ1WTsVUzVgLm6Zwb3dtBzwo6uxWHoOQFYYlRjkE5jNlJaS X-Received: by 2002:aa7:c948:0:b0:413:2bed:e82e with SMTP id h8-20020aa7c948000000b004132bede82emr6245064edt.394.1649205648340; Tue, 05 Apr 2022 17:40:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649205648; cv=none; d=google.com; s=arc-20160816; b=IevDbI+RN59OeBMuaUfRFZJRsqWI0hxIe3k4qw8t3M0HG6Fi66VIuqYz1UJUhOcymq SxnKqeYtFTMpGJwiy0HLQfrDRAAVHutTyebqTUaBTs/zEW2B1iFixVHt3liJRiMKIW5S OMcmi1G2A1qcig6WM9Q1u1ALGTdMIuQGvpBpvGSnAQ8pEK+VEisdcuc7y0ARLDpMOWYN 5ADqM4cx8MIKjVU5bZmBLeo5523wO4sMdKGwrlsSM6Q/j6Xdq6D29/hDSEx51QlgZDxO NZuIwIf+Bfnnx64K1WSLPRbGqgWvHJUVKu2Wy4j/7VnZYs136L5xGLkQXpBVmPfvVIQK sGtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=oJQvSWu3/fOGmn56jmYdSRw/M8VUcWvV1C89DF36Lqk=; b=aG0oKV+5mmFeEkehvvVb4OZiLOAoTRmd3P8f9te1UnQlepfsNtR6cLaUcBT53Z/nYB rxwLZhNp2w7szn1pzJEf9GTx2IRPo63EJDqZYojJGTF1R3/tW2g7WPER7Z6iZ2aESYgs v9Dwd+t3DQWSV6QAjggq91c9pUxj2hCA4KU+ihpJWDt6ADCO88zfTAvFgbfotijy8+rL TzCq+S14Mu+KYCwiw5l19QyKUHKrlEs1ZuVFFuaaft3plXWVRZWO784EJoqThsC2Cegm Vtssgvc5d+nX6SZQptqZvXJ0aDN9NiU/S18cz4XQ6l3APgdljylHyZc8NfvOb0Ykh+YJ Emug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=T8CDZTLM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j13-20020a170906254d00b006df76385d07si10234428ejb.423.2022.04.05.17.40.19; Tue, 05 Apr 2022 17:40:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@linuxfoundation.org header.s=korg header.b=T8CDZTLM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240215AbiDEN5P (ORCPT + 99 others); Tue, 5 Apr 2022 09:57:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55406 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347740AbiDEJ2O (ORCPT ); Tue, 5 Apr 2022 05:28:14 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56938DFDC3; Tue, 5 Apr 2022 02:15:42 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 30F00615E5; Tue, 5 Apr 2022 09:15:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 43451C385A0; Tue, 5 Apr 2022 09:15:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649150127; bh=fyksP8iHCy9RFz7uy483NgCx3ENE00nut1rH8XRHy80=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=T8CDZTLMOll9vHT3rLL7FWvjpJVcH2y0XEpF4QKXOs6RZAkoG6GszVOGW121zH2Kb 69Fc4T1b/uK8BI5l2R+pje02BTWq+4OKPT2/b1UxGPLFr6aDOL1V+Xzh8knPJXB/kO 6N9Zf71CKiF/wini30aQlOQG4OrQ8viCZULdsmuY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tom Rix , Marc Kleine-Budde Subject: [PATCH 5.16 0925/1017] can: mcp251xfd: mcp251xfd_register_get_dev_id(): fix return of error value Date: Tue, 5 Apr 2022 09:30:38 +0200 Message-Id: <20220405070421.674752162@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070354.155796697@linuxfoundation.org> References: <20220405070354.155796697@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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-kernel@vger.kernel.org From: Tom Rix commit fa7b514d2b2894e052b8e94c7a29feb98e90093f upstream. Clang static analysis reports this issue: | mcp251xfd-core.c:1813:7: warning: The left operand | of '&' is a garbage value | FIELD_GET(MCP251XFD_REG_DEVID_ID_MASK, dev_id), | ^ ~~~~~~ dev_id is set in a successful call to mcp251xfd_register_get_dev_id(). Though the status of calls made by mcp251xfd_register_get_dev_id() are checked and handled, their status' are not returned. So return err. Fixes: 55e5b97f003e ("can: mcp25xxfd: add driver for Microchip MCP25xxFD SPI CAN") Link: https://lore.kernel.org/all/20220319153128.2164120-1-trix@redhat.com Signed-off-by: Tom Rix Signed-off-by: Marc Kleine-Budde Signed-off-by: Greg Kroah-Hartman --- drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c +++ b/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c @@ -2706,7 +2706,7 @@ mcp251xfd_register_get_dev_id(const stru out_kfree_buf_rx: kfree(buf_rx); - return 0; + return err; } #define MCP251XFD_QUIRK_ACTIVE(quirk) \