提交 0c61cc3b 编写于 作者: D Dan Carpenter 提交者: Mauro Carvalho Chehab

[media] dib7000p: return error code on allocation failure

The goto needs to be moved after the assignment.
Signed-off-by: NDan Carpenter <error27@gmail.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 8513e144
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册