diff options
author | Sergey Senozhatsky <sergey.senozhatsky@gmail.com> | 2014-04-07 15:38:20 -0700 |
---|---|---|
committer | Simon Shields <keepcalm444@gmail.com> | 2016-06-12 21:20:04 +1000 |
commit | 4f995e62b6196b96a9fcdd0e1e86612f133a2940 (patch) | |
tree | a37bdc147035548eba3726416a14c59989250de8 /Documentation | |
parent | 0b609bd6091a0c80a422d704ff585a559caf2beb (diff) | |
download | kernel_samsung_smdk4412-4f995e62b6196b96a9fcdd0e1e86612f133a2940.zip kernel_samsung_smdk4412-4f995e62b6196b96a9fcdd0e1e86612f133a2940.tar.gz kernel_samsung_smdk4412-4f995e62b6196b96a9fcdd0e1e86612f133a2940.tar.bz2 |
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>
Change-Id: I3a6907a5cecbf087facea2251b60df75ec70bb21
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions