Re: [PATCH] zram: return error-valued pointer from zcomp_create()

2014-03-05 Thread Sergey Senozhatsky
On (03/05/14 12:13), Andrew Morton wrote: > On Wed, 5 Mar 2014 22:56:55 +0300 Sergey Senozhatsky > wrote: > > > Instead of returning just NULL, return ERR_PTR from zcomp_create() > > if compressing backend creation has failed. ERR_PTR(-EINVAL) for > > unsupported compression algorithm request,

Re: [PATCH] zram: return error-valued pointer from zcomp_create()

2014-03-05 Thread Andrew Morton
On Wed, 5 Mar 2014 22:56:55 +0300 Sergey Senozhatsky wrote: > Instead of returning just NULL, return ERR_PTR from zcomp_create() > if compressing backend creation has failed. ERR_PTR(-EINVAL) for > unsupported compression algorithm request, ERR_PTR(-ENOMEM) for > allocation (zcomp or

[PATCH] zram: return error-valued pointer from zcomp_create()

2014-03-05 Thread Sergey Senozhatsky
Instead of returning just NULL, return ERR_PTR from zcomp_create() if compressing backend creation has failed. ERR_PTR(-EINVAL) for unsupported compression algorithm request, ERR_PTR(-ENOMEM) for allocation (zcomp or compression stream) error. Perform IS_ERR() check of returned from

[PATCH] zram: return error-valued pointer from zcomp_create()

2014-03-05 Thread Sergey Senozhatsky
Instead of returning just NULL, return ERR_PTR from zcomp_create() if compressing backend creation has failed. ERR_PTR(-EINVAL) for unsupported compression algorithm request, ERR_PTR(-ENOMEM) for allocation (zcomp or compression stream) error. Perform IS_ERR() check of returned from

Re: [PATCH] zram: return error-valued pointer from zcomp_create()

2014-03-05 Thread Andrew Morton
On Wed, 5 Mar 2014 22:56:55 +0300 Sergey Senozhatsky sergey.senozhat...@gmail.com wrote: Instead of returning just NULL, return ERR_PTR from zcomp_create() if compressing backend creation has failed. ERR_PTR(-EINVAL) for unsupported compression algorithm request, ERR_PTR(-ENOMEM) for

Re: [PATCH] zram: return error-valued pointer from zcomp_create()

2014-03-05 Thread Sergey Senozhatsky
On (03/05/14 12:13), Andrew Morton wrote: On Wed, 5 Mar 2014 22:56:55 +0300 Sergey Senozhatsky sergey.senozhat...@gmail.com wrote: Instead of returning just NULL, return ERR_PTR from zcomp_create() if compressing backend creation has failed. ERR_PTR(-EINVAL) for unsupported compression