report: new report pattern i2c_set_clientdata_missing.cocci

add missing i2c_set_clientdata() in {{function}}

Add missing i2c_set_clientdata() in {{function}}, otherwise
calling i2c_get_clientdata() in remove returns NULL.

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

add missing platform_set_drvdata() in {{function}}

Add missing platform_set_drvdata() in {{function}}, otherwise
calling platform_get_drvdata() in remove returns NULL.

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

set correct platform drvdata in {{function}}

The XXX() use the platform drvdata as
a type of XXX, we should pass correct platform drvdata
to platform_set_drvdata().

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

add missing pci_set_drvdata() in {{function}}

Add missing pci_set_drvdata() in {{function}}, otherwise
calling pci_get_drvdata() in remove returns NULL.

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

set correct pci drvdata in {{function}}

The XXX() use the pci drvdata as a type
of XXX, we should pass correct pci drvdata
to pci_set_drvdata().

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

fix return value check in {{function}}

In case of error, the function debugfs_create_*() returns NULL
pointer not ERR_PTR() if debugfs is enabled. The IS_ERR() test
in the return value check should be replaced with NULL test.

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

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

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

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

add missing clk_disable_unprepare() in {{function}}

clock source is prepared and enabled by clk_prepare_enable()
in probe function, but no disable or unprepare in remove.

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

fix return value check in {{function}}

In case of error, the function XXXX() returns NULL pointer
not ERR_PTR(). The IS_ERR() test in the return value check
should be replaced with NULL test.

Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com>
patterns: update to 20131111

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