lkml.org 
[lkml]   [2004]   [Nov]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH] fix unnecessary increment in firmware_class_hotplug()
From
Date
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;
}
\
 
 \ /
  Last update: 2005-03-22 14:08    [W:0.038 / U:2.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site