Hi Tomeu,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on balbi-usb/next]
[also build test WARNING on next-20180323]
[cannot apply to v4.16-rc6]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:    
https://github.com/0day-ci/linux/commits/Tomeu-Vizoso/usb-dwc2-dwc2_vbus_supply_init-fix-error-check/20180324-063752
base:   https://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git next


coccinelle warnings: (new ones prefixed by >>)

>> drivers/usb/dwc2/hcd.c:367:9-16: ERROR: PTR_ERR applied after initialization 
>> to constant on line 366

vim +367 drivers/usb/dwc2/hcd.c

   358  
   359  static int dwc2_vbus_supply_init(struct dwc2_hsotg *hsotg)
   360  {
   361          hsotg->vbus_supply = devm_regulator_get_optional(hsotg->dev, 
"vbus");
   362          if (PTR_ERR(hsotg->vbus_supply) == -ENODEV) {
   363                  hsotg->vbus_supply = NULL;
   364                  return 0;
   365          } else if (IS_ERR(hsotg->vbus_supply)) {
 > 366                  hsotg->vbus_supply = NULL;
 > 367                  return PTR_ERR(hsotg->vbus_supply);
   368          }
   369  
   370          return regulator_enable(hsotg->vbus_supply);
   371  }
   372  

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to