Input: ims-pcu - fix uninitialized use of 'error' in ims_pcu_buffers_alloc()
In case allocation via usb_alloc_coherent() fails in ims_pcu_buffers_alloc(), the function jumps to the exit path without initializing local variable 'error' that is used as return value. Detected by Coverity - CID 1016531. Signed-off-by: Christian Engelmayer <cengelma@gmx.at> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:
parent
90550e6fb1
commit
19318de1da
|
@ -1566,6 +1566,7 @@ static int ims_pcu_buffers_alloc(struct ims_pcu *pcu)
|
||||||
if (!pcu->urb_ctrl_buf) {
|
if (!pcu->urb_ctrl_buf) {
|
||||||
dev_err(pcu->dev,
|
dev_err(pcu->dev,
|
||||||
"Failed to allocate memory for read buffer\n");
|
"Failed to allocate memory for read buffer\n");
|
||||||
|
error = -ENOMEM;
|
||||||
goto err_free_urb_out_buf;
|
goto err_free_urb_out_buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue