Re: [PATCH] staging/comedi: Fix undefined array subscript

From: Dan Carpenter
Date: Wed Feb 13 2013 - 09:02:26 EST


This patch works but it's nasty to re-intialize "reg" inside both
if else statements. Just do it once at the begining of the
function.

That means we would also delete the ininitialization from the if
side of the if else statement:

if (devpriv->model == VMK8061_MODEL) {
- reg = VMK8061_DO_REG;
tx_buf[0] = VMK8061_CMD_RD_DO;

regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/