Commit 71e56032 authored by Marcel Holtmann's avatar Marcel Holtmann Committed by Greg Kroah-Hartman

[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: default avatarKeiichiro Tokunaga <tokunaga.keiich@jp.fujitsu.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent b891bdec
......@@ -103,7 +103,7 @@ firmware_class_hotplug(struct class_device *class_dev, char **envp,
"FIRMWARE=%s", fw_priv->fw_id))
return -ENOMEM;
envp[i++] = NULL;
envp[i] = NULL;
return 0;
}
......
......@@ -656,7 +656,7 @@ static int usb_hotplug (struct device *dev, char **envp, int num_envp,
return -ENOMEM;
}
envp[i++] = NULL;
envp[i] = NULL;
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment