From: Takashi Iwai Date: Tue, 19 Aug 2014 15:37:55 +0000 (+0200) Subject: usbcore: Fix wrong device in an error message in hub_port_connect() X-Git-Tag: fix-v3.17-io-chain-v3~12^2~24 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd5f5006d1035547559c8a90781a7e249787a7a2;p=pandora-kernel.git usbcore: Fix wrong device in an error message in hub_port_connect() The commit [5ee0f803cc3a: usbcore: don't log on consecutive debounce failures of the same port] added the check of the reliable port, but it also replaced the device argument to dev_err() wrongly, which leads to a NULL dereference. This patch restores the right device, port_dev->dev. Also, since dev_err() itself shows the port number, reduce the port number shown in the error message, essentially reverting to the state before the commit 5ee0f803cc3a. [The fix suggested by Hannes, and the error message cleanup suggested by Alan Stern] Fixes: 5ee0f803cc3a ('usbcore: don't log on consecutive debounce failures of the same port') Reported-by: Hannes Reinecke Cc: Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed