Btrfs: correct error-handling zlib error handling
authorJulia Lawall <julia@diku.dk>
Fri, 7 Aug 2009 17:51:33 +0000 (13:51 -0400)
committerChris Mason <chris.mason@oracle.com>
Fri, 7 Aug 2009 17:51:33 +0000 (13:51 -0400)
find_zlib_workspace returns an ERR_PTR value in an error case instead of NULL.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@match exists@
expression x, E;
statement S1, S2;
@@

x = find_zlib_workspace(...)
... when != x = E
(
*  if (x == NULL || ...) S1 else S2
|
*  if (x == NULL && ...) S1 else S2
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Chris Mason <chris.mason@oracle.com>

No differences found