patch: new patch pattern free_irq_for_devm_request_irq.cocci

drop free_irq for devm_request_irq allocated irq

irq allocated with devm_request_irq should not be freed using
free_irq, because doing so causes a dangling pointer, and a
subsequent double free.

Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com>
patch: new patch pattern devm_kfree_for_devm_kzalloc.cocci

drop devm_kfree of devm_kzalloc'd data

The devm_kfree function allocates memory that is released
when a driver detaches. Thus, there is no reason to explicitly
call devm_kfree in probe or remove functions.

Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com>
patch: new patch pattern devm_free_irq_drop.cocci

drop devm_free_irq of devm_ allocated irq

The devm_request_irq function allocates irq that is released
when a driver detaches. Thus, there is no reason to explicitly
call devm_free_irq in probe or remove functions.

Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com>
patch: new patch pattern destroy_workqueue_missing.cocci

add missing destroy_workqueue() on error in {{function}}

Add the missing destroy_workqueue() before return from
{{function}} in the error handling case.

Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com>