Skip to content

Commit

Permalink
staging: comedi: fix potentially uninitialised variable
Browse files Browse the repository at this point in the history
If none of the if conditions take a true path, the ret variable will
never be assigned a value.

Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Michal Nazarewicz authored and Greg Kroah-Hartman committed Nov 25, 2013
1 parent 6ce4eac commit c16975a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/comedi/drivers/vmk80xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ static int vmk80xx_do_insn_bits(struct comedi_device *dev,
unsigned char *rx_buf = devpriv->usb_rx_buf;
unsigned char *tx_buf = devpriv->usb_tx_buf;
int reg, cmd;
int ret;
int ret = 0;

if (devpriv->model == VMK8061_MODEL) {
reg = VMK8061_DO_REG;
Expand Down

0 comments on commit c16975a

Please sign in to comment.