Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0c61cc3b authored by Dan Carpenter's avatar Dan Carpenter Committed by Mauro Carvalho Chehab
Browse files

[media] dib7000p: return error code on allocation failure



The goto needs to be moved after the assignment.

Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 8513e144
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;