net: ethernet: ti: davinci_cpdma: correct check on NULL in set rate
authorIvan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Wed, 18 Jan 2017 00:28:06 +0000 (02:28 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 18 Jan 2017 21:46:01 +0000 (16:46 -0500)
commite33c2ef106d17ad8cdb16a0be0ef0daebb2d2c16
tree192550e8c29061b72074fe11463d8296369e2e74
parente3e37e701713731b22f8cebfa1f5deed455cad8a
net: ethernet: ti: davinci_cpdma: correct check on NULL in set rate

Check "ch" on NULL first, then get ctlr.

Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ti/davinci_cpdma.c