Sergey Senozhatsky fcfa8d95ca zram: return error-valued pointer from zcomp_create()
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 zcomp_create() value in
disksize_store() and set return code to PTR_ERR().

Change suggested by Jerome Marchand.

[akpm@linux-foundation.org: clean up error recovery flow]
Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Reported-by: Jerome Marchand <jmarchan@redhat.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Nitin Gupta <ngupta@vflare.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-04-07 16:36:02 -07:00
..
2014-04-05 15:37:40 -07:00
2014-04-05 15:37:40 -07:00
2014-04-05 15:37:40 -07:00
2014-04-05 13:51:19 -07:00
2014-04-05 15:37:40 -07:00
2014-04-05 15:37:40 -07:00
2014-04-05 15:37:40 -07:00
2014-04-05 15:37:40 -07:00
2014-04-01 16:13:21 -07:00
2014-04-05 18:32:31 -07:00
2014-04-05 18:46:26 -07:00
2014-04-05 15:37:40 -07:00
2014-04-05 15:29:04 -07:00
2014-04-05 15:37:40 -07:00
2014-04-05 15:37:40 -07:00
2014-04-01 15:38:47 -07:00
2014-04-05 18:32:31 -07:00
2014-04-05 15:37:40 -07:00
2014-04-05 15:38:41 -07:00
2014-04-05 15:37:40 -07:00
2014-04-05 15:37:40 -07:00
2014-04-03 14:05:02 -07:00
2014-04-04 21:28:36 -07:00
2014-04-05 15:37:40 -07:00