From: H Hartley Sweeten Date: Mon, 25 Aug 2014 22:23:55 +0000 (-0700) Subject: staging: comedi: me4000: fix aref test in me4000_ai_check_chanlist() X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=a7dab19845cbbb78744b420a9a3d63356caaaf24;p=deliverable%2Flinux.git staging: comedi: me4000: fix aref test in me4000_ai_check_chanlist() The 'aref' (CR_AREF) values are all AREF_* defines. The SDF_* defines are subdevice flags. Fix the test in this function. Reported by: coverity Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/me4000.c b/drivers/staging/comedi/drivers/me4000.c index 9a5c535451a1..5d268e45e725 100644 --- a/drivers/staging/comedi/drivers/me4000.c +++ b/drivers/staging/comedi/drivers/me4000.c @@ -617,7 +617,7 @@ static int me4000_ai_check_chanlist(struct comedi_device *dev, return -EINVAL; } - if (aref == SDF_DIFF) { + if (aref == AREF_DIFF) { if (chan >= max_diff_chan) { dev_dbg(dev->class_dev, "Channel number to high\n");