drivers/acpi/sbs.c:acpi_sbs_remove() inconsistent NULL checking

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The Coverity checker spotted the following inconsistent NULL checking 
introduced by commit 3f86b83243d59bb50caf5938d284d22e10d082a4:

<--  snip  -->

...
int acpi_sbs_remove(struct acpi_device *device, int type)
{
        struct acpi_sbs *sbs = (struct acpi_sbs *)acpi_driver_data(device);
        int id;

        if (!device || !sbs) {
                return -EINVAL;
        }
...

<--  snip  -->

The NULL check for "device" is three lines after it got dereferenced the 
first time.

cu
Adrian

-- 

    Gentoo kernels are 42 times more popular than SUSE kernels among
    KLive users  (a service by SUSE contractor Andrea Arcangeli that
    gathers data about kernels from many users worldwide).

       There are three kinds of lies: Lies, Damn Lies, and Statistics.
                                                    Benjamin Disraeli

-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux