diff mbox

[PATCHv2] usb-bus: fix no params

Message ID a38b25541003291833m25cf2fc5wb96082c64d0975f0@mail.gmail.com
State New
Headers show

Commit Message

TeLeMan March 30, 2010, 1:33 a.m. UTC
After commit 702f3e0fb52c124c07f215426eeadb70a716643f, the params is
nerver NULL. It should check *params instead of params to determine
whether the params is empty.

Signed-off-by: TeLeMan <geleman@gmail.com>
---
 hw/usb-bus.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Aurelien Jarno April 2, 2010, 10:16 a.m. UTC | #1
On Tue, Mar 30, 2010 at 09:33:24AM +0800, TeLeMan wrote:
> After commit 702f3e0fb52c124c07f215426eeadb70a716643f, the params is
> nerver NULL. It should check *params instead of params to determine
> whether the params is empty.
> 
> Signed-off-by: TeLeMan <geleman@gmail.com>

Thanks, applied.

> ---
>  hw/usb-bus.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/hw/usb-bus.c b/hw/usb-bus.c
> index ce8a694..ee0e9e3 100644
> --- a/hw/usb-bus.c
> +++ b/hw/usb-bus.c
> @@ -299,7 +299,7 @@ USBDevice *usbdevice_create(const char *cmdline)
>      }
> 
>      if (!usb->usbdevice_init) {
> -        if (params) {
> +        if (*params) {
>              error_report("usbdevice %s accepts no params", driver);
>              return NULL;
>          }
> -- 
> 1.6.5.1.1367.gcd48
> 
> --
> SUN OF A BEACH
> 
> 
>
diff mbox

Patch

diff --git a/hw/usb-bus.c b/hw/usb-bus.c
index ce8a694..ee0e9e3 100644
--- a/hw/usb-bus.c
+++ b/hw/usb-bus.c
@@ -299,7 +299,7 @@  USBDevice *usbdevice_create(const char *cmdline)
     }

     if (!usb->usbdevice_init) {
-        if (params) {
+        if (*params) {
             error_report("usbdevice %s accepts no params", driver);
             return NULL;
         }