From: Dan Carpenter Date: Sat, 6 Aug 2011 08:00:34 +0000 (-0300) Subject: [media] dib7000p: return error code on allocation failure X-Git-Tag: next-20110927~67^2~4^2~162 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=0c61cc3ba4c9b74cfdd6a1ee07492199ffdd9818;p=karo-tx-linux.git [media] dib7000p: return error code on allocation failure The goto needs to be moved after the assignment. Signed-off-by: Dan Carpenter Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/dvb/frontends/dib7000p.c b/drivers/media/dvb/frontends/dib7000p.c index 4eb9c2b49cd5..ce8534ff142e 100644 --- a/drivers/media/dvb/frontends/dib7000p.c +++ b/drivers/media/dvb/frontends/dib7000p.c @@ -1598,8 +1598,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;