public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] Staging: zcache: signedness bug in tmem_get()
@ 2011-08-09 18:01 Dan Carpenter
  2011-08-09 21:23 ` Dan Magenheimer
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2011-08-09 18:01 UTC (permalink / raw)
  To: kernel-janitors

"ret" needs to be signed for the error handling to work properly.

Signed-off-by: Dan Carpenter <error27@gmail.com>

diff --git a/drivers/staging/zcache/tmem.c b/drivers/staging/zcache/tmem.c
index 975e34b..1ca66ea 100644
--- a/drivers/staging/zcache/tmem.c
+++ b/drivers/staging/zcache/tmem.c
@@ -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;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-08-09 21:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-09 18:01 [patch] Staging: zcache: signedness bug in tmem_get() Dan Carpenter
2011-08-09 21:23 ` Dan Magenheimer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox