Skip to content

Commit

Permalink
usb: drd-lib: correct the state checking condition
Browse files Browse the repository at this point in the history
usb_drd_stop_hcd() should check for DRD_HOST_REGISTERED, not
DRD_HOST_ACTIVE, as other usb_drd_st{art,op}_*() functions do.

Signed-off-by: Bin Liu <[email protected]>
Signed-off-by: Sekhar Nori <[email protected]>
  • Loading branch information
liubiin authored and nsekhar committed Feb 4, 2015
1 parent 0ba13e2 commit f53c2b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/drd-lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ int usb_drd_stop_hcd(struct device *parent)
if (!drd)
return -ENODEV;

if (WARN_ON(!(drd->state & DRD_HOST_ACTIVE)))
if (WARN_ON(!(drd->state & DRD_HOST_REGISTERED)))
return -EINVAL;

setup = drd->host->host_setup;
Expand Down

0 comments on commit f53c2b8

Please sign in to comment.