From: Devendra Naga Date: Thu, 13 Sep 2012 17:09:29 +0000 (-0400) Subject: staging:ccg: cleanup a bit of binding X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7505817603854506732affb584ef6568a4702d6f;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git staging:ccg: cleanup a bit of binding 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/ccg/ccg.c b/drivers/staging/ccg/ccg.c index 565249b2d755..3fbb300cbe30 100644 --- a/drivers/staging/ccg/ccg.c +++ b/drivers/staging/ccg/ccg.c @@ -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)