All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] [media] dib7000p: return error code on allocation failure
@ 2011-08-06  8:00 ` Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2011-08-06  8:00 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Patrick Boettcher, Olivier Grenie, Devin Heitmueller,
	open list:MEDIA INPUT INFRA..., kernel-janitors

The goto needs to be moved after the assignment.

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

diff --git a/drivers/media/dvb/frontends/dib7000p.c b/drivers/media/dvb/frontends/dib7000p.c
index a64a538..9c40267 100644
--- a/drivers/media/dvb/frontends/dib7000p.c
+++ b/drivers/media/dvb/frontends/dib7000p.c
@@ -1577,8 +1577,8 @@ int dib7000pc_detection(struct i2c_adapter *i2c_adap)
 		return -ENOMEM;
 	rx = kzalloc(2*sizeof(u8), GFP_KERNEL);
 	if (!rx) {
-		goto rx_memory_error;
 		ret = -ENOMEM;
+		goto rx_memory_error;
 	}
 
 	msg[0].buf = tx;

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

end of thread, other threads:[~2011-08-06  8:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-06  8:00 [patch] [media] dib7000p: return error code on allocation failure Dan Carpenter
2011-08-06  8:00 ` Dan Carpenter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.