ChangeSet 1.2223.2.14, 2004/11/29 10:40:36-08:00, [EMAIL PROTECTED]

[PATCH] fix unnecessary increment in firmware_class_hotplug() and USB core

>   This patch is to fix unnecessary increment of 'i' used to
> specify an element of an arry 'envp[]' in firmware_class_hotplug().
> The 'i' is already incremented in add_hotplug_env_var(), actually.

you are right. The incrementation is wrong, but it doesn't have any
negative effect. However the same applies for the usb_hotplug() function
in drivers/usb/core/usb.c.

Signed-off-by: Keiichiro Tokunaga <[EMAIL PROTECTED]>
Signed-off-by: Marcel Holtmann <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>


 drivers/base/firmware_class.c |    2 +-
 drivers/usb/core/usb.c        |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


diff -Nru a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
--- a/drivers/base/firmware_class.c     2004-11-30 15:43:25 -08:00
+++ b/drivers/base/firmware_class.c     2004-11-30 15:43:25 -08:00
@@ -103,7 +103,7 @@
                        "FIRMWARE=%s", fw_priv->fw_id))
                return -ENOMEM;
 
-       envp[i++] = NULL;
+       envp[i] = NULL;
 
        return 0;
 }
diff -Nru a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
--- a/drivers/usb/core/usb.c    2004-11-30 15:43:25 -08:00
+++ b/drivers/usb/core/usb.c    2004-11-30 15:43:25 -08:00
@@ -656,7 +656,7 @@
                        return -ENOMEM;
        }
 
-       envp[i++] = NULL;
+       envp[i] = NULL;
 
        return 0;
 }



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to