Messages in this thread Patch in this message | | | Subject | Re: [PATCH] fix unnecessary increment in firmware_class_hotplug() | From | Marcel Holtmann <> | Date | Fri, 26 Nov 2004 21:30:24 +0100 |
| |
Hi Keiichiro,
> 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 <tokunaga.keiich@jp.fujitsu.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Regards
Marcel
===== drivers/usb/core/usb.c 1.182 vs edited ===== --- 1.182/drivers/usb/core/usb.c 2004-11-07 23:31:07 +01:00 +++ edited/drivers/usb/core/usb.c 2004-11-26 21:27:08 +01:00 @@ -656,7 +656,7 @@ return -ENOMEM; } - envp[i++] = NULL; + envp[i] = NULL; return 0; } ===== drivers/base/firmware_class.c 1.24 vs edited ===== --- 1.24/drivers/base/firmware_class.c 2004-11-08 03:16:05 +01:00 +++ edited/drivers/base/firmware_class.c 2004-11-26 21:26:48 +01:00 @@ -103,7 +103,7 @@ "FIRMWARE=%s", fw_priv->fw_id)) return -ENOMEM; - envp[i++] = NULL; + envp[i] = NULL; return 0; } | |