From patchwork Tue Jan 28 14:06:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 232487 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=unavailable 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 EEB07C33CB3 for ; Tue, 28 Jan 2020 14:42:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BFE3D24688 for ; Tue, 28 Jan 2020 14:42:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580222556; bh=2IlUtJTJbKBJAHL7rr3Zmi4Neo47Xs2N+P5Hq5OxvbA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=TNA914f9FcwoiwDTD90J5fQysPJOFz4Xn+xuD+r3u7w2bGYMH95HdqbFibrGlcO/5 nGKtys1uPf97iqeWxV3Fo+WiUNSJf9EpzL87P0w35fzhLh+ECAzXQW6WHICcF3twXg 8pzXEj3WJdOJL+V/CJU704sX12othLapFKhWvbmE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726906AbgA1Omc (ORCPT ); Tue, 28 Jan 2020 09:42:32 -0500 Received: from mail.kernel.org ([198.145.29.99]:34438 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729122AbgA1OM4 (ORCPT ); Tue, 28 Jan 2020 09:12:56 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 E440D2468F; Tue, 28 Jan 2020 14:12:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580220776; bh=2IlUtJTJbKBJAHL7rr3Zmi4Neo47Xs2N+P5Hq5OxvbA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=p07V2McxgDv4Q2bBzeS2ZTFJUlLeCJTEeHk5ShGJAIRCz3O+ErpKZVKvkWGzfVlr9 UqwJLSLiZZJk6DuABIhMUvC7FlpFex0tKoJBSJQ4ltikE3IHtU7hEOY/ezrQyVAzRU KY+abL/83XjCuVW1F9emU3nLZGsb9CJNpuJRABmQ= 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.4 141/183] net: broadcom/bcmsysport: Fix signedness in bcm_sysport_probe() Date: Tue, 28 Jan 2020 15:06:00 +0100 Message-Id: <20200128135843.829260915@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200128135829.486060649@linuxfoundation.org> References: <20200128135829.486060649@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 53b3c1a5851c3..9530ee12726f3 100644 --- a/drivers/net/ethernet/broadcom/bcmsysport.c +++ b/drivers/net/ethernet/broadcom/bcmsysport.c @@ -1794,7 +1794,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