]> git.baikalelectronics.ru Git - kernel.git/commit
pch_gbe: fix if condition in set_settings()
authorDan Carpenter <error27@gmail.com>
Tue, 12 Oct 2010 23:36:19 +0000 (23:36 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 16 Oct 2010 18:13:20 +0000 (11:13 -0700)
commite02e0f6323ea2baef479e5be448b8828dd964d59
tree84a248d335452737f66912fe61f8ad5e9ac3a7e7
parent356da241bfe5c9fef610f120ded89c06820cdfff
pch_gbe: fix if condition in set_settings()

There were no curly braces in this if condition so it always enabled full
duplex.

And ecmd->speed is an unsigned short so it is never equal to -1.  The
effect is that mii_ethtool_sset() fails with -EINVAL and an error is
printed to dmesg.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/pch_gbe/pch_gbe_ethtool.c