This patch does not change the logic, it only
corrects the formatting and checkpatch checks by
to NULL comparison.
The patch fixes 5 checks of type:
"Comparison to NULL could be written".
Signed-off-by: Pavel Zemlyanoy <zemlyanoy@ispras.ru>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Reviewed-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
struct page *page = pages[i];
void *dst;
- if (page == NULL) {
- if (src != NULL) {
+ if (!page) {
+ if (src) {
if (!mirrored[j])
kunmap_atomic(src);
src = NULL;
}
if (i) {
- if (src == NULL)
+ if (!src)
src = mirrored[i-1] ?
percpu_data + (i-1) * PAGE_SIZE :
kmap_atomic(compressed_pages[i-1]);
kunmap_atomic(dst);
}
- if (src != NULL && !mirrored[j])
+ if (src && !mirrored[j])
kunmap_atomic(src);
preempt_enable();
for (i = 0; i < nr_pages; ++i) {
j = min((unsigned int)PAGE_SIZE - pageofs, outlen);
- if (pages[i] != NULL) {
+ if (pages[i]) {
if (ret < 0)
SetPageError(pages[i]);
else if (clusterpages == 1 && pages[i] == compressed_pages[0])