From patchwork Fri Jan 24 09:32:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 232888 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A809FC35242 for ; Fri, 24 Jan 2020 11:33:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7A826214DB for ; Fri, 24 Jan 2020 11:33:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579865627; bh=8qqQxDrZw419BxuS8vtAzVOtgZqvRsC1xgPlPaca5XQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=CVlBuLRH2ke7wdwQ/FO+kr/RFMg+vWAC9yNacuatCqLZrSjgvdo8UIONTstn9yKnb d3ie5fQA0rOVDJkGreE9NBIjh/OfSUBPaAuLvzDiOVqC71QfPgxIDJ6Ahv0FXcL2M3 79RZoWwt+zuc1+CUS553ubvdHiWYOaET5ewqhiEM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404635AbgAXLdq (ORCPT ); Fri, 24 Jan 2020 06:33:46 -0500 Received: from mail.kernel.org ([198.145.29.99]:53398 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404620AbgAXLdp (ORCPT ); Fri, 24 Jan 2020 06:33:45 -0500 Received: from localhost (ip-213-127-102-57.ip.prioritytelecom.net [213.127.102.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A699C206D4; Fri, 24 Jan 2020 11:33:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579865624; bh=8qqQxDrZw419BxuS8vtAzVOtgZqvRsC1xgPlPaca5XQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E5T24KSfBwkodedjKd3H5y/ELh2UorLmoQiip76hedKmCnSUiBxRO4qjaxGxsxWe3 T9IOnZvvwTM6EZEVell3PGXRaiJkYDWdRtj9Vc5H+97xmG4yf+9ee3XK921JhvSOy2 zSgAVz19TBAFOWgZpV35YSLLIL7OisDeNp+6Bbz8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Florian Fainelli , "David S. Miller" , Sasha Levin Subject: [PATCH 4.19 577/639] net: broadcom/bcmsysport: Fix signedness in bcm_sysport_probe() Date: Fri, 24 Jan 2020 10:32:27 +0100 Message-Id: <20200124093201.743119776@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200124093047.008739095@linuxfoundation.org> References: <20200124093047.008739095@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Dan Carpenter [ Upstream commit 25a584955f020d6ec499c513923fb220f3112d2b ] The "priv->phy_interface" variable is an enum and in this context GCC will treat it as unsigned so the error handling will never be triggered. Fixes: 80105befdb4b ("net: systemport: add Broadcom SYSTEMPORT Ethernet MAC driver") Signed-off-by: Dan Carpenter Acked-by: Florian Fainelli Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/broadcom/bcmsysport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/broadcom/bcmsysport.c b/drivers/net/ethernet/broadcom/bcmsysport.c index 0bdbc72605e1f..49aa3b5ea57cc 100644 --- a/drivers/net/ethernet/broadcom/bcmsysport.c +++ b/drivers/net/ethernet/broadcom/bcmsysport.c @@ -2470,7 +2470,7 @@ static int bcm_sysport_probe(struct platform_device *pdev) priv->phy_interface = of_get_phy_mode(dn); /* Default to GMII interface mode */ - if (priv->phy_interface < 0) + if ((int)priv->phy_interface < 0) priv->phy_interface = PHY_INTERFACE_MODE_GMII; /* In the case of a fixed PHY, the DT node associated