lkml.org 
[lkml]   [2012]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectNew Defect(s) reported by Coverity Scan
Date

Hi,

Please find the latest report on new defect(s) that have been introduced to the Linux Kernel found with Coverity SCAN.


Defect(s) Reported-by: Coverity Scan:
___________________________________________________________________________
** CID 716812: Unchecked return value (CHECKED_RETURN)
/drivers/platform/x86/ideapad-laptop.c: 639
http://scan5.coverity.com:8080/sourcebrowser.htm?projectId=10063#mergedDefectId=716812


** CID 715732: Macro compares unsigned to 0 (NO_EFFECT)
/drivers/gpu/drm/nouveau/nve0_fifo.c: 307
http://scan5.coverity.com:8080/sourcebrowser.htm?projectId=10063#mergedDefectId=715732


** CID 715543: Dereference before null check (REVERSE_INULL)
/drivers/input/touchscreen/eeti_ts.c: 209
http://scan5.coverity.com:8080/sourcebrowser.htm?projectId=10063#mergedDefectId=715543



###########################################################################
Defect Details:
___________________________________________________________________________
CID 716812: Unchecked return value (CHECKED_RETURN)
http://scan5.coverity.com:8080/sourcebrowser.htm?projectId=10063#mergedDefectId=716812

/drivers/platform/x86/ideapad-laptop.c: 639 ( check_return)
636 {
637 unsigned long bit, value;
638
>>> CID 716812: Unchecked return value (CHECKED_RETURN) Calling function
>>> "read_ec_data(acpi_handle, int, unsigned long *)" without checking return value (as is done elsewhere 23 out of 25 times).
>>> No check of the return value of "read_ec_data(ideapad_handle, 49, &value)".
639 read_ec_data(ideapad_handle, VPCCMD_R_SPECIAL_BUTTONS, &value);
640
641 for (bit = 0; bit < 16; bit++) {
642 if (test_bit(bit, &value)) {
643 switch (bit) {


________________________________________________________________________
CID 715732: Macro compares unsigned to 0 (NO_EFFECT)
http://scan5.coverity.com:8080/sourcebrowser.htm?projectId=10063#mergedDefectId=715732

/drivers/gpu/drm/nouveau/nve0_fifo.c: 307 ( unsigned_compare)
304 int ret = -EINVAL;
305
306 spin_lock_irqsave(&dev_priv->channels.lock, flags);
>>> CID 715732: Macro compares unsigned to 0 (NO_EFFECT) This
>>> greater-than-or-equal-to-zero comparison of an unsigned value is always true. "chid >= 0U".
307 if (likely(chid >= 0 && chid < priv->base.channels)) {
308 chan = dev_priv->channels.ptr[chid];
309 if (likely(chan))
310 ret = nouveau_finish_page_flip(chan, NULL);
311 }

________________________________________________________________________
CID 715543: Dereference before null check (REVERSE_INULL)
http://scan5.coverity.com:8080/sourcebrowser.htm?projectId=10063#mergedDefectId=715543

/drivers/input/touchscreen/eeti_ts.c: 202 ( deref_ptr)
199
200 priv->client = client;
201 priv->input = input;
>>> Directly dereferencing pointer "pdata".
202 priv->irq_gpio = pdata->irq_gpio;
203 priv->irq = gpio_to_irq(pdata->irq_gpio);
204
205 err = gpio_request_one(pdata->irq_gpio, GPIOF_IN, client->name);
206 if (err < 0)
207 goto err1;
208
>>> CID 715543: Dereference before null check (REVERSE_INULL)
>>> Null-checking "pdata" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
209 if (pdata)
210 priv->irq_active_high = pdata->irq_active_high;
211
212 irq_flags = priv->irq_active_high ?
213 IRQF_TRIGGER_RISING : IRQF_TRIGGER_FALLING;

________________________________________________________________________


To view the defects in Coverity Scan visit, http://scan5.coverity.com:8080.
Your username should be the first part of your email address. If you don't have a username, you can request one by emailing: scan-admin@coverity.com

Thank you,
Dakshesh Vyas
Coverity SCAN-ADMIN
scan-admin@coverity.com
http://scan.coverity.com



\
 
 \ /
  Last update: 2012-08-23 00:41    [W:1.565 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site