We should not be doing assignments within an if () block so fix up the code to not do this. change was created using Coccinelle. CC: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> CC: Felipe Balbi <balbi@xxxxxx> CC: Dan Williams <dan.j.williams@xxxxxxxxx> CC: Antoine Tenart <antoine.tenart@xxxxxxxxxxxxxxxxxx> CC: Petr Mladek <pmladek@xxxxxxx> CC: Michal Sojka <sojka@xxxxxxxxx> CC: "Rafael J. Wysocki" <rafael.j.wysocki@xxxxxxxxx> CC: Sergei Shtylyov <sergei.shtylyov@xxxxxxxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/usb/core/hcd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index 45a915ccd71c..be5b2074f906 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c @@ -2691,7 +2691,8 @@ int usb_add_hcd(struct usb_hcd *hcd, if ((retval = usb_register_bus(&hcd->self)) < 0) goto err_register_bus; - if ((rhdev = usb_alloc_dev(NULL, &hcd->self, 0)) == NULL) { + rhdev = usb_alloc_dev(NULL, &hcd->self, 0); + if (rhdev == NULL) { dev_err(hcd->self.controller, "unable to allocate root hub\n"); retval = -ENOMEM; goto err_allocate_root_hub; -- 2.3.7 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html