Skip to content

Commit

Permalink
Staging: zcache: signedness bug in tmem_get()
Browse files Browse the repository at this point in the history
"ret" needs to be signed for the error handling to work properly.

Signed-off-by: Dan Carpenter <[email protected]>
Acked-by: Dan Magenheimer <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
error27 authored and gregkh committed Aug 23, 2011
1 parent c5f5c4d commit 1dcab08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/zcache/tmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ int tmem_get(struct tmem_pool *pool, struct tmem_oid *oidp, uint32_t index,
struct tmem_obj *obj;
void *pampd;
bool ephemeral = is_ephemeral(pool);
uint32_t ret = -1;
int ret = -1;
struct tmem_hashbucket *hb;
bool free = (get_and_free == 1) || ((get_and_free == 0) && ephemeral);
bool lock_held = false;
Expand Down

0 comments on commit 1dcab08

Please sign in to comment.