The index variable of list_for_each_entry_safe is never NULL.
Generated by: scripts/coccinelle/iterators/itnull.cocci
CC: Geliang Tang <[email protected]>
Signed-off-by: Fengguang Wu <[email protected]>
Signed-off-by: Julia Lawall <[email protected]>
---
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, ¶ms->resp_queue, list) {
- if (r && r->buf == buf) {
+ if (r->buf == buf) {
list_del(&r->list);
kfree(r);
}
Julia Lawall <[email protected]> writes:
> The index variable of list_for_each_entry_safe is never NULL.
>
> Generated by: scripts/coccinelle/iterators/itnull.cocci
>
> CC: Geliang Tang <[email protected]>
> Signed-off-by: Fengguang Wu <[email protected]>
> Signed-off-by: Julia Lawall <[email protected]>
doesn't apply. Does this depend on anything ?
--
balbi
On Tue, 22 Dec 2015, Felipe Balbi wrote:
> Julia Lawall <[email protected]> writes:
>
> > The index variable of list_for_each_entry_safe is never NULL.
> >
> > Generated by: scripts/coccinelle/iterators/itnull.cocci
> >
> > CC: Geliang Tang <[email protected]>
> > Signed-off-by: Fengguang Wu <[email protected]>
> > Signed-off-by: Julia Lawall <[email protected]>
>
> doesn't apply. Does this depend on anything ?
It may be derived from a patch posted to a mailing list. I don't have the
original reference any more.
julia
Hi,
Julia Lawall <[email protected]> writes:
> On Tue, 22 Dec 2015, Felipe Balbi wrote:
>
>> Julia Lawall <[email protected]> writes:
>>
>> > The index variable of list_for_each_entry_safe is never NULL.
>> >
>> > Generated by: scripts/coccinelle/iterators/itnull.cocci
>> >
>> > CC: Geliang Tang <[email protected]>
>> > Signed-off-by: Fengguang Wu <[email protected]>
>> > Signed-off-by: Julia Lawall <[email protected]>
>>
>> doesn't apply. Does this depend on anything ?
>
> It may be derived from a patch posted to a mailing list. I don't have the
> original reference any more.
okay, it could be the big series converting gadgets to
list_for_each_entry_safe(). Thanks
--
balbi