From 34b0516ec4f97f43bd0f9bc3a1ed5325fc297cef Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Tue, 1 Jan 2019 13:48:43 +0100 Subject: [PATCH] [BATTC] Fixed an oops! --- drivers/battery/battc/battc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/battery/battc/battc.c b/drivers/battery/battc/battc.c index 22664d40296..d07db5f4953 100644 --- a/drivers/battery/battc/battc.c +++ b/drivers/battery/battc/battc.c @@ -201,13 +201,16 @@ BatteryClassIoctl(PVOID ClassData, BATTERY_NOTIFY BattNotify; ULONG ReturnedLength; - DPRINT("Received IOCTL %x for %p\n", IrpSp->Parameters.DeviceIoControl.IoControlCode, - ClassData); + DPRINT("BatteryClassIoctl(%p %p)\n", ClassData, Irp); BattClass = ClassData; + IrpSp = IoGetCurrentIrpStackLocation(Irp); Irp->IoStatus.Information = 0; + DPRINT("Received IOCTL %x for %p\n", IrpSp->Parameters.DeviceIoControl.IoControlCode, + ClassData); + switch (IrpSp->Parameters.DeviceIoControl.IoControlCode) { case IOCTL_BATTERY_QUERY_TAG: