Bug 80401 - ata/pata_ep93xx.c:929: poor error checking ?
Summary: ata/pata_ep93xx.c:929: poor error checking ?
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: drivers_other
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-16 20:24 UTC by David Binderman
Modified: 2014-07-17 12:20 UTC (History)
1 user (show)

See Also:
Kernel Version: 3.16-rc5
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description David Binderman 2014-07-16 20:24:02 UTC
[linux-3.16-rc5/drivers/ata/pata_ep93xx.c:929]: (style) Checking if unsigned variable 'irq' is less than zero.

Source code is

    irq = platform_get_irq(pdev, 0);
    if (irq < 0) {

but

    unsigned int irq;

$ fgrep platform_get_irq `find . -name \*.h -print`
./include/linux/platform_device.h:extern int platform_get_irq(struct platform_device *, unsigned int);

Suggest read return value from platform_get_irq into
a signed variable and test that.
Comment 1 Andrey Utkin 2014-07-17 12:20:27 UTC
Thanks, patch submitted: https://patchwork.kernel.org/patch/4574831/

Note You need to log in before you can comment on or make changes to this bug.