mqprio: Avoid panic if no options are provided
authorThomas Graf <tgraf@redhat.com>
Thu, 22 Dec 2011 02:05:07 +0000 (02:05 +0000)
committerRohan Somvanshi <rsomvanshi@nvidia.com>
Wed, 11 Jan 2012 18:22:25 +0000 (10:22 -0800)
commitd9e062cc32ae75bd4656fc5232cb477ae0edf7fe
treeb814b2e1bd5a979977b1cafa7b07ad78f9e61142
parent2c4f8dd8dc5066030cd01559a574b999e967610d
mqprio: Avoid panic if no options are provided

[ Upstream commit 7838f2ce36b6ab5c13ef20b1857e3bbd567f1759 ]

Userspace may not provide TCA_OPTIONS, in fact tc currently does
so not do so if no arguments are specified on the command line.
Return EINVAL instead of panicing.

Signed-off-by: Thomas Graf <tgraf@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Change-Id: Iad24a5287dd16619b31b9c30917615ab1fcb56b0
Reviewed-on: http://git-master/r/74216
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>
net/sched/sch_mqprio.c