]> git.baikalelectronics.ru Git - kernel.git/commit
net: bcmgenet: Remove checks on clock handles
authorFlorian Fainelli <f.fainelli@gmail.com>
Thu, 23 Jul 2015 00:28:23 +0000 (17:28 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 27 Jul 2015 00:21:56 +0000 (17:21 -0700)
commit09b7baa9b7d3b02eec03f316c45750f9e89e4c93
tree953ed5ae4110cf53d229e139eb86dc591571533b
parent04e2dc0757d34b499086f65f0fcd1a95dbaf99eb
net: bcmgenet: Remove checks on clock handles

Instead of multiplying the number of checks for IS_ERR(priv->clk),
simply NULLify the 'struct clk' pointer which is something the Linux
common clock framework perfectly deals with and does early return for
each and every single clk_* API functions.

Having every single function check for !IS_ERR(priv->clk) is both
redundant and error prone, as it turns out, we were doing it for the
main GENET clock: priv->clk, but not for the Wake-on-LAN or EEE clock,
so let's just be consistent here.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Petri Gynther <pgynther@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/genet/bcmgenet.c