@@ -746,14 +746,12 @@ static int cy8c95x0_gpio_get_direction(struct gpio_chip *gc, unsigned int off)
746
746
747
747
ret = cy8c95x0_regmap_read (chip , CY8C95X0_DIRECTION , port , & reg_val );
748
748
if (ret < 0 )
749
- goto out ;
749
+ return ret ;
750
750
751
751
if (reg_val & bit )
752
752
return GPIO_LINE_DIRECTION_IN ;
753
753
754
754
return GPIO_LINE_DIRECTION_OUT ;
755
- out :
756
- return ret ;
757
755
}
758
756
759
757
static int cy8c95x0_gpio_get_pincfg (struct cy8c95x0_pinctrl * chip ,
@@ -815,25 +813,23 @@ static int cy8c95x0_gpio_get_pincfg(struct cy8c95x0_pinctrl *chip,
815
813
case PIN_CONFIG_SLEEP_HARDWARE_STATE :
816
814
case PIN_CONFIG_SLEW_RATE :
817
815
default :
818
- ret = - ENOTSUPP ;
819
- goto out ;
816
+ return - ENOTSUPP ;
820
817
}
821
818
/*
822
819
* Writing 1 to one of the drive mode registers will automatically
823
820
* clear conflicting set bits in the other drive mode registers.
824
821
*/
825
822
ret = cy8c95x0_regmap_read (chip , reg , port , & reg_val );
826
823
if (ret < 0 )
827
- goto out ;
824
+ return ret ;
828
825
829
826
if (reg_val & bit )
830
827
arg = 1 ;
831
828
if (param == PIN_CONFIG_OUTPUT_ENABLE )
832
829
arg = !arg ;
833
830
834
831
* config = pinconf_to_config_packed (param , (u16 )arg );
835
- out :
836
- return ret ;
832
+ return 0 ;
837
833
}
838
834
839
835
static int cy8c95x0_gpio_set_pincfg (struct cy8c95x0_pinctrl * chip ,
@@ -845,7 +841,6 @@ static int cy8c95x0_gpio_set_pincfg(struct cy8c95x0_pinctrl *chip,
845
841
unsigned long param = pinconf_to_config_param (config );
846
842
unsigned long arg = pinconf_to_config_argument (config );
847
843
unsigned int reg ;
848
- int ret ;
849
844
850
845
switch (param ) {
851
846
case PIN_CONFIG_BIAS_PULL_UP :
@@ -876,22 +871,17 @@ static int cy8c95x0_gpio_set_pincfg(struct cy8c95x0_pinctrl *chip,
876
871
reg = CY8C95X0_PWMSEL ;
877
872
break ;
878
873
case PIN_CONFIG_OUTPUT_ENABLE :
879
- ret = cy8c95x0_pinmux_direction (chip , off , !arg );
880
- goto out ;
874
+ return cy8c95x0_pinmux_direction (chip , off , !arg );
881
875
case PIN_CONFIG_INPUT_ENABLE :
882
- ret = cy8c95x0_pinmux_direction (chip , off , arg );
883
- goto out ;
876
+ return cy8c95x0_pinmux_direction (chip , off , arg );
884
877
default :
885
- ret = - ENOTSUPP ;
886
- goto out ;
878
+ return - ENOTSUPP ;
887
879
}
888
880
/*
889
881
* Writing 1 to one of the drive mode registers will automatically
890
882
* clear conflicting set bits in the other drive mode registers.
891
883
*/
892
- ret = cy8c95x0_regmap_write_bits (chip , reg , port , bit , bit );
893
- out :
894
- return ret ;
884
+ return cy8c95x0_regmap_write_bits (chip , reg , port , bit , bit );
895
885
}
896
886
897
887
static int cy8c95x0_gpio_get_multiple (struct gpio_chip * gc ,
0 commit comments