net-sysfs: Fix memory leak in XPS configuration
authorAlexander Duyck <alexander.h.duyck@intel.com>
Thu, 31 May 2018 19:59:46 +0000 (15:59 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 11 Jun 2018 20:49:21 +0000 (22:49 +0200)
commit0dbd822f64401cbdef40e9e476e89f67c690be64
treee1fa80f3d56104267c8e3e5263971ac9e9b45d4c
parent900679988fdf24d687c746e909b10e47e442ad05
net-sysfs: Fix memory leak in XPS configuration

[ Upstream commit 664088f8d68178809b848ca450f2797efb34e8e7 ]

This patch reorders the error cases in showing the XPS configuration so
that we hold off on memory allocation until after we have verified that we
can support XPS on a given ring.

Fixes: 184c449f91fe ("net: Add support for XPS with QoS via traffic classes")
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/core/net-sysfs.c