Ver código fonte

[media] dib7000p: return error code on allocation failure

The goto needs to be moved after the assignment.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Dan Carpenter 14 anos atrás
pai
commit
0c61cc3ba4
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      drivers/media/dvb/frontends/dib7000p.c

+ 1 - 1
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;