public inbox for linux-media@vger.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; only message 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] only message in thread

only message in thread, other threads:[~2011-08-06  8:00 UTC | newest]

Thread overview: (only message) (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

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