aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/misc/ims-pcu.c
diff options
context:
space:
mode:
authorChristian Engelmayer <cengelma@gmx.at>2014-05-18 19:00:40 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2014-05-19 01:39:56 -0400
commit19318de1daf25aa1ca4fe76e1d7ac834f1bfb0c4 (patch)
treefdcbf238217bebb6ba55efd5448c0b0012f03c4c /drivers/input/misc/ims-pcu.c
parent90550e6fb19f42cd6184e56006206ca8296d596b (diff)
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>
Diffstat (limited to 'drivers/input/misc/ims-pcu.c')
-rw-r--r--drivers/input/misc/ims-pcu.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/input/misc/ims-pcu.c b/drivers/input/misc/ims-pcu.c
index 5a736397d9c8..719410feb84b 100644
--- a/drivers/input/misc/ims-pcu.c
+++ b/drivers/input/misc/ims-pcu.c
@@ -1566,6 +1566,7 @@ static int ims_pcu_buffers_alloc(struct ims_pcu *pcu)
1566 if (!pcu->urb_ctrl_buf) { 1566 if (!pcu->urb_ctrl_buf) {
1567 dev_err(pcu->dev, 1567 dev_err(pcu->dev,
1568 "Failed to allocate memory for read buffer\n"); 1568 "Failed to allocate memory for read buffer\n");
1569 error = -ENOMEM;
1569 goto err_free_urb_out_buf; 1570 goto err_free_urb_out_buf;
1570 } 1571 }
1571 1572