Remove unused assignment.
Found by: clang static analyzer Found by: Coverity Prevent[tm] (CID 4537, 4538, 4539)
This commit is contained in:
parent
e78c7a0a9a
commit
30363a9a9e
@ -380,7 +380,6 @@ acpi_fujitsu_init(struct acpi_fujitsu_softc *sc)
|
||||
OID_AUTO, "fujitsu", CTLFLAG_RD, 0, "");
|
||||
|
||||
for (i = 0; sysctl_table[i].name != NULL; i++) {
|
||||
exists = 0;
|
||||
switch(sysctl_table[i].method) {
|
||||
case METHOD_GMOU:
|
||||
exists = sc->gmou.exists;
|
||||
@ -566,9 +565,6 @@ static uint8_t
|
||||
acpi_fujitsu_check_hardware(struct acpi_fujitsu_softc *sc)
|
||||
{
|
||||
int val;
|
||||
struct acpi_softc *acpi_sc;
|
||||
|
||||
acpi_sc = acpi_device_get_parent_softc(sc->dev);
|
||||
|
||||
ACPI_SERIAL_ASSERT(fujitsu);
|
||||
/* save the hotkey bitmask */
|
||||
|
@ -453,7 +453,6 @@ static int
|
||||
acpi_hp_attach(device_t dev)
|
||||
{
|
||||
struct acpi_hp_softc *sc;
|
||||
struct acpi_softc *acpi_sc;
|
||||
devclass_t wmi_devclass;
|
||||
int arg;
|
||||
|
||||
@ -477,7 +476,6 @@ acpi_hp_attach(device_t dev)
|
||||
sc->cmi_order_size = -1;
|
||||
sc->verbose = 0;
|
||||
memset(sc->cmi_order, 0, sizeof(sc->cmi_order));
|
||||
acpi_sc = acpi_device_get_parent_softc(dev);
|
||||
|
||||
if (!(wmi_devclass = devclass_find ("acpi_wmi"))) {
|
||||
device_printf(dev, "Couldn't find acpi_wmi devclass\n");
|
||||
|
@ -743,8 +743,6 @@ acpi_ibm_sysctl_set(struct acpi_ibm_softc *sc, int method, int arg)
|
||||
return (status);
|
||||
|
||||
if (sc->cmos_handle) {
|
||||
val = val_ec & IBM_EC_MASK_VOL;
|
||||
|
||||
Args.Count = 1;
|
||||
Args.Pointer = &Arg;
|
||||
Arg.Type = ACPI_TYPE_INTEGER;
|
||||
|
@ -257,12 +257,10 @@ static void
|
||||
acpi_dock_insert(device_t dev)
|
||||
{
|
||||
struct acpi_dock_softc *sc;
|
||||
ACPI_HANDLE h;
|
||||
|
||||
ACPI_SERIAL_ASSERT(dock);
|
||||
|
||||
sc = device_get_softc(dev);
|
||||
h = acpi_get_handle(dev);
|
||||
|
||||
if (sc->status == ACPI_DOCK_STATUS_UNDOCKED ||
|
||||
sc->status == ACPI_DOCK_STATUS_UNKNOWN) {
|
||||
@ -414,7 +412,6 @@ acpi_dock_status_sysctl(SYSCTL_HANDLER_ARGS)
|
||||
device_t dev;
|
||||
int status, err;
|
||||
|
||||
err = 0;
|
||||
dev = (device_t)arg1;
|
||||
|
||||
sc = device_get_softc(dev);
|
||||
|
@ -429,15 +429,11 @@ acpi_video_vo_init(UINT32 adr)
|
||||
{
|
||||
struct acpi_video_output *vn, *vo, *vp;
|
||||
int n, x;
|
||||
int display_index;
|
||||
int display_port;
|
||||
char name[8], env[32];
|
||||
const char *type, *desc;
|
||||
struct acpi_video_output_queue *voqh;
|
||||
|
||||
ACPI_SERIAL_ASSERT(video);
|
||||
display_index = adr & DOD_DEVID_MASK_DISPIDX;
|
||||
display_port = (adr & DOD_DEVID_MASK_DISPPORT) >> 4;
|
||||
|
||||
switch (adr & DOD_DEVID_MASK) {
|
||||
case DOD_DEVID_MONITOR:
|
||||
@ -474,7 +470,7 @@ acpi_video_vo_init(UINT32 adr)
|
||||
}
|
||||
|
||||
n = 0;
|
||||
vn = vp = NULL;
|
||||
vp = NULL;
|
||||
STAILQ_FOREACH(vn, voqh, vo_unit.next) {
|
||||
if (vn->vo_unit.num != n)
|
||||
break;
|
||||
@ -782,7 +778,6 @@ acpi_video_vo_presets_sysctl(SYSCTL_HANDLER_ARGS)
|
||||
struct acpi_video_output *vo;
|
||||
int i, level, *preset, err;
|
||||
|
||||
err = 0;
|
||||
vo = (struct acpi_video_output *)arg1;
|
||||
ACPI_SERIAL_BEGIN(video_output);
|
||||
if (vo->handle == NULL) {
|
||||
@ -942,7 +937,6 @@ vo_get_brightness_levels(ACPI_HANDLE handle, int **levelp)
|
||||
ACPI_OBJECT *res;
|
||||
int num, i, n, *levels;
|
||||
|
||||
num = 0;
|
||||
bcl_buf.Length = ACPI_ALLOCATE_BUFFER;
|
||||
bcl_buf.Pointer = NULL;
|
||||
status = AcpiEvaluateObject(handle, "_BCL", NULL, &bcl_buf);
|
||||
|
Loading…
Reference in New Issue
Block a user