Skip to content

Commit

Permalink
[media] dib7000p: return error code on allocation failure
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and Mauro Carvalho Chehab committed Sep 3, 2011
1 parent 8513e14 commit 0c61cc3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/dvb/frontends/dib7000p.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0c61cc3

Please sign in to comment.