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

2016-11-17 Thread Sudip Mukherjee
On Thursday 17 November 2016 01:21 PM, Marek Vasut wrote: On 11/16/2016 09:56 PM, Sudip Mukherjee wrote: On Wednesday 16 November 2016 04:56 PM, Marek Vasut wrote: On 11/16/2016 08:52 AM, Sudip Mukherjee wrote: On Tuesday 15 November 2016 11:42 PM, Marek Vasut wrote: On 11/16/2016 12:09 AM, S

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

2016-11-17 Thread Marek Vasut
On 11/16/2016 09:56 PM, Sudip Mukherjee wrote: > On Wednesday 16 November 2016 04:56 PM, Marek Vasut wrote: >> On 11/16/2016 08:52 AM, Sudip Mukherjee wrote: >>> On Tuesday 15 November 2016 11:42 PM, Marek Vasut wrote: On 11/16/2016 12:09 AM, Sudip Mukherjee wrote: > debugfs_create_dir() a

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

2016-11-16 Thread Sudip Mukherjee
On Wednesday 16 November 2016 04:56 PM, Marek Vasut wrote: On 11/16/2016 08:52 AM, Sudip Mukherjee wrote: On Tuesday 15 November 2016 11:42 PM, Marek Vasut wrote: On 11/16/2016 12:09 AM, Sudip Mukherjee wrote: debugfs_create_dir() and debugfs_create_file() returns NULL on error or a pointer on

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

2016-11-16 Thread Marek Vasut
On 11/16/2016 08:52 AM, Sudip Mukherjee wrote: > On Tuesday 15 November 2016 11:42 PM, Marek Vasut wrote: >> On 11/16/2016 12:09 AM, 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 E

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

2016-11-15 Thread Sudip Mukherjee
On Tuesday 15 November 2016 11:42 PM, Marek Vasut wrote: On 11/16/2016 12:09 AM, 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_

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

2016-11-15 Thread Marek Vasut
On 11/16/2016 12:09 AM, 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 NULL. > > Si

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

2016-11-15 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 --- drivers/mtd/nand/nandsim