[PATCH] MIPS: Modify error handling

2016-07-29 Thread Amitoj Kaur Chawla
debugfs_create_file returns NULL on error so an IS_ERR test is incorrect here and a NULL check is required. The Coccinelle semantic patch used to make this change is as follows: @@ expression e; @@ e = debugfs_create_file(...); if( -IS_ERR(e) +!e ) { <+... return -

[PATCH] MIPS: Modify error handling

2016-07-29 Thread Amitoj Kaur Chawla
debugfs_create_file returns NULL on error so an IS_ERR test is incorrect here and a NULL check is required. The Coccinelle semantic patch used to make this change is as follows: @@ expression e; @@ e = debugfs_create_file(...); if( -IS_ERR(e) +!e ) { <+... return -