Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp772916pxb; Tue, 5 Apr 2022 22:42:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw1jVwFO8c3a8eLYdpnu3+e/kFk8a3PwMO32c9uNqqQpqAebfGiQ3SbzZWBBen49hXZ/fLT X-Received: by 2002:a17:902:ec89:b0:156:c5db:356d with SMTP id x9-20020a170902ec8900b00156c5db356dmr6889029plg.74.1649223774168; Tue, 05 Apr 2022 22:42:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649223774; cv=none; d=google.com; s=arc-20160816; b=jq+XJoNy81L4CyiXT7ox5yILn7XiZqw+4+6/M8Vb8ega8v43IO7gf4PojFPtegqZAG YTypmxMzo6k93M19VRtXrSF2RR5ricB6mzdUjJJoouQ7xqmLqTUjuSkPgrw+kKtaCqwy m/skyffifqSZjY696Bl8KFZwaTnMKSUtIXW7YmB27C1V9ZoqByCNBJfgtBgNfp3NcejX p1wGTNQxdfOfo9aTWPSS9s8AhaxRZ6ji+gaQFdKf02p/TmvPzQPMbFfF0kkWBHEbrJqE cOxHw5TnAFUXvDh8bgEWIPSmzhwRs9nBXrhdSjO0Q9/BB4s7Iekyt9HvriVTdR6o0Fwm +nzA== 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=Mgui4QC9i/z1b4w0jUK0H27AJNnCN6jny0CUL8Jk+N3qnCl+6psTlx50kiKyRyBRo7 y22qvhJx8z0lTETRZOYnvsl5UxOU7CJDUBzJ+wuhgR4WzudpFnenoDfXHcq3SneRHQSO LMwMrHIf3IIt/JzfD4cQ7K5jmNIwoBnAd+rSZ4A0sJIyxgozeLjuopzl+xPNBue8PSwW 8se8CPBLuGGWO1Ydebyu/3JpZFzxNTuNYeJJIAeZQyFxu1vOZKfpKJTqtrY4n0FPLZNS hmPcJWLqEB5q/sZ53B4xN8tGfRHskkIATEZDorgTS+zotvdmKzicsyqyvLIwl2DncZoO VCgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ZLzONp8k; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id m186-20020a6326c3000000b003816043ee4dsi15853946pgm.66.2022.04.05.22.42.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 22:42:54 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ZLzONp8k; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A7C9444587B; Tue, 5 Apr 2022 21:48:08 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354157AbiDEXzB (ORCPT + 99 others); Tue, 5 Apr 2022 19:55:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354007AbiDEKKg (ORCPT ); Tue, 5 Apr 2022 06:10:36 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F7D0C624A; Tue, 5 Apr 2022 02:56:36 -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 B6C096157A; Tue, 5 Apr 2022 09:56:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BAF7CC385A1; Tue, 5 Apr 2022 09:56:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649152595; bh=fyksP8iHCy9RFz7uy483NgCx3ENE00nut1rH8XRHy80=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZLzONp8ko362pXWtScoS5XQo38TItglRAl3LPvHesG/hJc60OMOupKsMjrA3YGPDY yFEtdyS9s8gfehhxu988OmNX78Mpht/PUlZdAESMokr+FjZmE1TU75y0jxrw6zk+kz a1k2HLmBRcq37sY2Ls/7QBLrUwZc991n5YmkV71w= 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.15 834/913] can: mcp251xfd: mcp251xfd_register_get_dev_id(): fix return of error value Date: Tue, 5 Apr 2022 09:31:36 +0200 Message-Id: <20220405070404.829894294@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070339.801210740@linuxfoundation.org> References: <20220405070339.801210740@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=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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) \