Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp6017723ybc; Wed, 27 Nov 2019 13:29:26 -0800 (PST) X-Google-Smtp-Source: APXvYqySQm0qC7uFMjv25lY8lOHvFVXN9SKbC7DiWyVfeZLfwu3elcCh0+2k84DaFM6JpiGdbZ8r X-Received: by 2002:a50:e88a:: with SMTP id f10mr29312277edn.277.1574890166546; Wed, 27 Nov 2019 13:29:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574890166; cv=none; d=google.com; s=arc-20160816; b=PjfIzN51F49y11jV6t7gUk7pG5QSeMhLz+ioMzFE2/ezK+IFTQN7cs/JNdf7p0fv1L UCmxErWXDWmBW4V1jzc7JW/F6iGKAZt01yi039UAeQ9Bl180rWRmADWt44ndySOyUeQP h70U8hyNwk2kzpa/VDuUMPK1gpaHSZ6iMhQHwa2Rii8ZVdorXXvwCegXzWW+S34npYrj DDoQz5l4gkGvqX6A5iKBsu+PYV6YZ1zjy1oROBCvyg2pJSwXyqlbjBRhC0ZFfrtkVmIV 1rEE9jzZXQGVKDsoRYDeJixmxGnR0OVjbQ0GExvRR1vS56Tyc6BAj6BkngDlUXOntJJ/ Bdmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=uqT+Z/yN2v47gJAPsKCFLbCHl+dOFHoKcwrPNCoSY+o=; b=tNPzNsXScvnnkv+78/fnoh0E2avXc6zNNKJ7F60gLLcESjzpDBNEuvMMlH8uI3j2me S34a0E6Nnv+95blyqS2gFZ6hDqjFJL4QIG7/7MR1g9CD+68FefCl4RPQJT7qH6a51QsA 50tLfE49eibtErObEno7EUUNq/4g221cWnM9aK85gw/wBWdUoPlN59O5zygQomPaEQ4U oXzwmIBFX+c6rCi1EJmvZy2ttD9vpBA966jIdY3rYY5h3LUilDWyLlXEhncam/6sOZ6Y jBl++Krh/Ozsa7JQBitbZS05gucZXEUfvBvFYd1azpjU73H+U8QPKPhq+K/8LEuReLm/ OAdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="M7/rRr4z"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n19si3706405edb.312.2019.11.27.13.29.03; Wed, 27 Nov 2019 13:29:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="M7/rRr4z"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731547AbfK0VAX (ORCPT + 99 others); Wed, 27 Nov 2019 16:00:23 -0500 Received: from mail.kernel.org ([198.145.29.99]:52060 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731288AbfK0VAP (ORCPT ); Wed, 27 Nov 2019 16:00:15 -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 5305320678; Wed, 27 Nov 2019 21:00:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574888414; bh=QGsz8Ks1Tojt059lcycjgRGYNsiZ059yMmZcprWBtGc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=M7/rRr4z1ZJthcF2mMamp9Lxa46M4Ti81ABtbb2SePix1tS7Sg4OuxmQ9qgtXHPb6 DDCfj8l9yyHPD4OrnOH9vK7U8AU/9FXEhobryRu//MIMtuAb5+L64bTEWzEl6Y+kLX iw5nj5+qypZuM8ADpjaDyPoRvPBp1s8Nx51TuoWA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , "David S. Miller" , Sasha Levin Subject: [PATCH 4.19 125/306] qlcnic: fix a return in qlcnic_dcb_get_capability() Date: Wed, 27 Nov 2019 21:29:35 +0100 Message-Id: <20191127203124.252076176@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127203114.766709977@linuxfoundation.org> References: <20191127203114.766709977@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dan Carpenter [ Upstream commit c94f026fb742b2d3199422751dbc4f6fc0e753d8 ] These functions are supposed to return one on failure and zero on success. Returning a zero here could cause uninitialized variable bugs in several of the callers. For example: drivers/scsi/cxgbi/cxgb4i/cxgb4i.c:1660 get_iscsi_dcb_priority() error: uninitialized symbol 'caps'. Fixes: 48365e485275 ("qlcnic: dcb: Add support for CEE Netlink interface.") Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.c index 4b76c69fe86d2..834208e55f7b8 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.c @@ -883,7 +883,7 @@ static u8 qlcnic_dcb_get_capability(struct net_device *netdev, int capid, struct qlcnic_adapter *adapter = netdev_priv(netdev); if (!test_bit(QLCNIC_DCB_STATE, &adapter->dcb->state)) - return 0; + return 1; switch (capid) { case DCB_CAP_ATTR_PG: -- 2.20.1