Trivial change to have only one return in 'rt2880_get_group_name' function using a ternary operator instead of an if statement and two returns. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@xxxxxxxxx> --- drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c b/drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c index 5aa29c7..697a4e8 100644 --- a/drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c +++ b/drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c @@ -54,10 +54,7 @@ static const char *rt2880_get_group_name(struct pinctrl_dev *pctrldev, { struct rt2880_priv *p = pinctrl_dev_get_drvdata(pctrldev); - if (group >= p->group_count) - return NULL; - - return p->group_names[group]; + return (group >= p->group_count) ? NULL : p->group_names[group]; } static int rt2880_get_group_pins(struct pinctrl_dev *pctrldev, -- 2.7.4 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel