[PATCH] usb: gadget: rndis: fix itnull.cocci warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The index variable of list_for_each_entry_safe is never NULL.

Generated by: scripts/coccinelle/iterators/itnull.cocci

CC: Geliang Tang <geliangtang@xxxxxxx>
Signed-off-by: Fengguang Wu <fengguang.wu@xxxxxxxxx>
Signed-off-by: Julia Lawall <julia.lawall@xxxxxxx>
---

 rndis.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/usb/gadget/function/rndis.c
+++ b/drivers/usb/gadget/function/rndis.c
@@ -1009,7 +1009,7 @@ void rndis_free_response(struct rndis_pa
 	rndis_resp_t *r, *n;
 
 	list_for_each_entry_safe(r, n, &params->resp_queue, list) {
-		if (r && r->buf == buf) {
+		if (r->buf == buf) {
 			list_del(&r->list);
 			kfree(r);
 		}
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux