mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] xhci: Redundant check for
@ 2011-08-22 15:35 sifram rajas
  2011-08-22 15:55 ` Sarah Sharp
  0 siblings, 1 reply; 4+ messages in thread
From: sifram rajas @ 2011-08-22 15:35 UTC (permalink / raw)
  To: sarah.a.sharp, linux-usb, linux-kernel

Hi Sarah,

This patch is for linux-3.0.3.

In the xhci_check_args() function in xhci.c, there is a redundant
check for xhci->devs.

This is redundant because the struct xhci_hcd->devs is actually
defined as a static array
of pointers and is not a pointer to a pointer.

Signed-off-by: Sifram Rajas <sifram.rajas@gmail.com>
---
drivers/usb/host/xhci.c |   3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
--- a/drivers/usb/host/xhci.c	2011-08-17 23:27:16.000000000 +0530
+++ b/drivers/usb/host/xhci.c	2011-08-22 20:43:34.250000000 +0530
@@ -945,8 +945,7 @@ static int xhci_check_args(struct usb_hc
 		return -ENODEV;

 	if (check_virt_dev) {
-		if (!udev->slot_id || !xhci->devs
-			|| !xhci->devs[udev->slot_id]) {
+		if (!udev->slot_id || !xhci->devs[udev->slot_id]) {
 			printk(KERN_DEBUG "xHCI %s called with unaddressed "
 						"device\n", func);
 			return -EINVAL;

Thanks,
Sifram Rajas.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-08-23 11:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-22 15:35 [PATCH] xhci: Redundant check for sifram rajas
2011-08-22 15:55 ` Sarah Sharp
2011-08-22 18:11   ` Kautuk Consul
2011-08-23 11:30   ` Sebastian Andrzej Siewior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®