Skip to content

Commit

Permalink
staging:ccg: cleanup a bit of binding
Browse files Browse the repository at this point in the history
the ccg_bind_function uses ret variable and a logic around the
ccg_bind_enabled_functions to return a value other than 0 if
bind function fail, other wise returns 0, this can be achieved
with just a return ccg_bind_enabled_functions(dev, c);

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Devendra Naga authored and Greg Kroah-Hartman committed Sep 14, 2012
1 parent 99d4b1a commit 7505817
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions drivers/staging/ccg/ccg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1101,13 +1101,7 @@ static struct device_attribute *ccg_usb_attributes[] = {
static int ccg_bind_config(struct usb_configuration *c)
{
struct ccg_dev *dev = _ccg_dev;
int ret = 0;

ret = ccg_bind_enabled_functions(dev, c);
if (ret)
return ret;

return 0;
return ccg_bind_enabled_functions(dev, c);
}

static void ccg_unbind_config(struct usb_configuration *c)
Expand Down

0 comments on commit 7505817

Please sign in to comment.