Re: [PATCH v2] mtd: nand: nandsim: fix error check

2016-11-19 Thread Boris Brezillon
On Wed, 16 Nov 2016 08:02:55 + Sudip Mukherjee wrote: > debugfs_create_dir() and debugfs_create_file() returns NULL on error or > a pointer on success. They do not return the error value with ERR_PTR. > So we should not check the return with IS_ERR_OR_NULL, instead we > should just check for

[PATCH v2] mtd: nand: nandsim: fix error check

2016-11-16 Thread Sudip Mukherjee
debugfs_create_dir() and debugfs_create_file() returns NULL on error or a pointer on success. They do not return the error value with ERR_PTR. So we should not check the return with IS_ERR_OR_NULL, instead we should just check for NULL. Signed-off-by: Sudip Mukherjee --- v2: nuked err drivers/