Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp525261pxb; Tue, 15 Feb 2022 20:51:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJx69Dmf3ClOnAMQD2qYCqQ0wkXeJhWeqQuDK+XEFzcA0GqykQ3jSK/ZNJG7drD4buJMnqzn X-Received: by 2002:a17:906:7c0c:b0:6b3:d16e:7e40 with SMTP id t12-20020a1709067c0c00b006b3d16e7e40mr986885ejo.104.1644987113064; Tue, 15 Feb 2022 20:51:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644987113; cv=none; d=google.com; s=arc-20160816; b=XHbmcmrvmJnpNdhyUCFG8wwXulH/RKD3bphMmVLD+0obxKZl7U+hCKZNWkyVUzMqfy 2yJKGzn1TXKgTzwAbYhYqpsHWe1q3rVPDgQVynjGBuEnNqmqTys1LxdIcML2l8vhtbPb MREE0O5nBSdvBIrVVaqjmGW8HeHh06w+cM2n5lPsJlfZYZqoqEN8Nu5nhd9VvxVXFm4O Nq84GGXU0zF+H16UCZAHTJMYxxKNjCYIn8uMFkdzTt0C68PZdv9LIKMK8mQ4putMvhON WSItV9JEYtUp/gaOa+xUAmLcIjOoCFyMkAGE9FblCOdk1rlqzWH+SBvQSMtgty0JPgTB SPZg== 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 :message-id:date:subject:cc:to:from; bh=lCX2y1aTAiOoHLjP/0t8VBaRdaedc/v0p6VMGyLohiE=; b=wo53BFFHFjVx/ShyczJjj7n3UM0hFzuSzSUV1zpV/ZtPtVaBGK2yYldtxskhovWilr I5RLVBJnUhNy41+t1V5tKDN4SOZTOgD1parFEACa7gL+U/FbWn8IZ83fnnfdr89wcZ/n 7u07GTuPLsYZuQDzkWMDea6sSFGI8ErA+dPC1rcJBndNSt33dBxgCAuxNkI+9gRibNuB qtyAtWyTGjB+mcxy3x1x4eqXZFUTX7sX9YXSQB8zgXUIQnJs12f1IjZm2KZrH7mPEuAc 5A6ICP+f2UsWFXxZ2h0vKvi5GkpKA/yblGJWUDXIWbVOQ8MxBR94QxXCjiv4FTYhaPbS I1Gw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z13si1338951edd.111.2022.02.15.20.51.30; Tue, 15 Feb 2022 20:51:53 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245574AbiBPBpY (ORCPT + 99 others); Tue, 15 Feb 2022 20:45:24 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:58448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244340AbiBPBpX (ORCPT ); Tue, 15 Feb 2022 20:45:23 -0500 Received: from out30-131.freemail.mail.aliyun.com (out30-131.freemail.mail.aliyun.com [115.124.30.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96E6DF9FB4; Tue, 15 Feb 2022 17:45:11 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R421e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e01424;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0V4akc2F_1644975908; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0V4akc2F_1644975908) by smtp.aliyun-inc.com(127.0.0.1); Wed, 16 Feb 2022 09:45:09 +0800 From: Yang Li To: davem@davemloft.net Cc: kuba@kernel.org, josright123@gmail.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Yang Li , Abaci Robot Subject: [PATCH -next] net: Fix an ignored error return from dm9051_get_regs() Date: Wed, 16 Feb 2022 09:45:07 +0800 Message-Id: <20220216014507.109117-1-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL 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 The return from the call to dm9051_get_regs() is int, it can be a negative error code, however this is being assigned to an unsigned int variable 'ret', so making 'ret' an int. Eliminate the following coccicheck warning: ./drivers/net/ethernet/davicom/dm9051.c:527:5-8: WARNING: Unsigned expression compared with zero: ret < 0 Reported-by: Abaci Robot Signed-off-by: Yang Li --- drivers/net/ethernet/davicom/dm9051.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/davicom/dm9051.c b/drivers/net/ethernet/davicom/dm9051.c index d2513c97f83e..8984363624eb 100644 --- a/drivers/net/ethernet/davicom/dm9051.c +++ b/drivers/net/ethernet/davicom/dm9051.c @@ -519,7 +519,7 @@ static int dm9051_map_init(struct spi_device *spi, struct board_info *db) static int dm9051_map_chipid(struct board_info *db) { struct device *dev = &db->spidev->dev; - unsigned int ret; + int ret; unsigned short wid; u8 buff[6]; -- 2.20.1.7.g153144c