]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
staging: silicom: Remove needless calls of get_status_port_fn()
authorChristian Engelmayer <cengelma@gmx.at>
Wed, 7 May 2014 19:24:00 +0000 (21:24 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 May 2014 11:40:41 +0000 (20:40 +0900)
Remove a needless pointer initialisation and call to get_status_port_fn()
in functions remove_bypass_tpl_auto() and set_tpl_fn(). Variable
'pbpctl_dev_b' is set correctly later in the function before first use.

Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/silicom/bpctl_mod.c

index 266becf8416998410f38a0d036c32e867827cd33..03b83b8c91cf2d86573cb829a738b84b396a304f 100644 (file)
@@ -4735,10 +4735,9 @@ static void bp_tpl_timer_fn(unsigned long param)
 
 static void remove_bypass_tpl_auto(struct bpctl_dev *pbpctl_dev)
 {
-       struct bpctl_dev *pbpctl_dev_b = NULL;
+       struct bpctl_dev *pbpctl_dev_b;
        if (!pbpctl_dev)
                return;
-       pbpctl_dev_b = get_status_port_fn(pbpctl_dev);
 
        if (pbpctl_dev->bp_caps & TPL_CAP) {
                del_timer_sync(&pbpctl_dev->bp_tpl_timer);
@@ -4785,12 +4784,10 @@ static int set_bypass_tpl_auto(struct bpctl_dev *pbpctl_dev, unsigned int param)
 static int set_tpl_fn(struct bpctl_dev *pbpctl_dev, int tpl_mode)
 {
 
-       struct bpctl_dev *pbpctl_dev_b = NULL;
+       struct bpctl_dev *pbpctl_dev_b;
        if (!pbpctl_dev)
                return -1;
 
-       pbpctl_dev_b = get_status_port_fn(pbpctl_dev);
-
        if (pbpctl_dev->bp_caps & TPL_CAP) {
                if (tpl_mode) {
                        pbpctl_dev_b = get_status_port_fn(pbpctl_dev);