Showing error 1718

User: Jiri Slaby
Error type: Invalid Pointer Dereference
Error type description: A pointer which is invalid is being dereferenced
File location: drivers/acpi/video.c
Line in file: 755
Project: Linux Kernel
Project version: 2.6.28
Tools: Smatch (1.59)
Entered: 2013-09-10 20:24:52 UTC


Source:

 725        }
 726        if (ACPI_SUCCESS(acpi_get_handle(device->dev->handle,"_BQC",&h_dummy1)))
 727                device->cap._BQC = 1;
 728        if (ACPI_SUCCESS(acpi_get_handle(device->dev->handle, "_DDC", &h_dummy1))) {
 729                device->cap._DDC = 1;
 730        }
 731        if (ACPI_SUCCESS(acpi_get_handle(device->dev->handle, "_DCS", &h_dummy1))) {
 732                device->cap._DCS = 1;
 733        }
 734        if (ACPI_SUCCESS(acpi_get_handle(device->dev->handle, "_DGS", &h_dummy1))) {
 735                device->cap._DGS = 1;
 736        }
 737        if (ACPI_SUCCESS(acpi_get_handle(device->dev->handle, "_DSS", &h_dummy1))) {
 738                device->cap._DSS = 1;
 739        }
 740
 741        if (acpi_video_backlight_support())
 742                max_level = acpi_video_init_brightness(device);
 743
 744        if (device->cap._BCL && device->cap._BCM && max_level > 0) {
 745                int result;
 746                static int count = 0;
 747                char *name;
 748                name = kzalloc(MAX_NAME_LEN, GFP_KERNEL);
 749                if (!name)
 750                        return;
 751
 752                sprintf(name, "acpi_video%d", count++);
 753                device->backlight = backlight_device_register(name,
 754                        NULL, device, &acpi_backlight_ops);
 755                device->backlight->props.max_brightness = device->brightness->count-3;
 756                /*
 757                 * If there exists the _BQC object, the _BQC object will be
 758                 * called to get the current backlight brightness. Otherwise
 759                 * the brightness will be set to the maximum.
 760                 */
 761                if (device->cap._BQC)
 762                        device->backlight->props.brightness =
 763                                acpi_video_get_brightness(device->backlight);
 764                else
 765                        device->backlight->props.brightness =
Show full sources