]> git.baikalelectronics.ru Git - kernel.git/commit
net: fec: handle optional clk_ptp more gracefully
authorShawn Guo <shawn.guo@linaro.org>
Mon, 18 Mar 2013 07:33:39 +0000 (15:33 +0800)
committerShawn Guo <shawn.guo@linaro.org>
Thu, 4 Apr 2013 13:22:39 +0000 (21:22 +0800)
commit9f86c74d578e032cf040ec9ace5f2f0af02e24c3
treeb81711c934f84e4066e1a9dcd3eebd56e6b847ee
parentb8ec9a0ec16fea0cb75d4de3c31a297ddc72bba2
net: fec: handle optional clk_ptp more gracefully

When the optional clk_ptp is absent, we can just set it to NULL, and
clk API will just handle it gracefully.  It saves us from checking
clk_ptp whenever calling into clk API.

Also since clk_ptp is optional, the "ret" variable shouldn't be set
in case that the clock is absent.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/fec.c