Re: [patch 2/2] [media] ds3000: off by one in ds3000_read_snr()
From: Dan Carpenter
Date: Thu Jan 19 2012 - 07:21:13 EST
On Thu, Jan 19, 2012 at 11:26:41AM +0100, walter harms wrote:
> >> perhaps it is more useful to do it in the check above ?
> >
> > It looks like the check is correct but we need to shift all the
> > values by one. Again, I don't have this hardware, I'm just going by
> > the context.
> >
> I do not have the hardware either so this is pure theoretical.
>
> Access to the data field depends on the value of dvbs2_noise_reading/tmp
> even when the data are reasonable like 50/100 snr_reading would become 0
> and the index suddenly is -1.
>
It's a good point. I will redo the patch.
regards,
dan carpenter
Attachment:
signature.asc
Description: Digital signature