Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 64543652 authored by Max Dmitrichenko's avatar Max Dmitrichenko Committed by Greg Kroah-Hartman
Browse files

USB: fix Unaligned access in EHCI driver



I get following warnings on spar64:
Kernel unaligned access at TPC[1000c9e4] ehci_hub_control+0x54c/0x68c [ehci_hcd]

Despite of the comment in the patched code, the type cast used there
does make unaligned access. The fix was made as it's done in
ohci-hub.c.

Signed-off-by: default avatarMax Dmitrichenko <dmitrmax@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent d8b21606
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -653,8 +653,7 @@ static int ehci_hub_control (
	if (status & ~0xffff)	/* only if wPortChange is interesting */
	if (status & ~0xffff)	/* only if wPortChange is interesting */
#endif
#endif
		dbg_port (ehci, "GetStatus", wIndex + 1, temp);
		dbg_port (ehci, "GetStatus", wIndex + 1, temp);
		// we "know" this alignment is good, caller used kmalloc()...
		put_unaligned(cpu_to_le32 (status), (__le32 *) buf);
		*((__le32 *) buf) = cpu_to_le32 (status);
		break;
		break;
	case SetHubFeature:
	case SetHubFeature:
		switch (wValue) {
		switch (wValue) {