]> git.hungrycats.org Git - linux/commitdiff
Avoid oops on systems that set atkbd_reset.
authorRichard Henderson <rth@dot.sfbay.redhat.com>
Thu, 10 Oct 2002 10:28:04 +0000 (03:28 -0700)
committerRichard Henderson <rth@are.twiddle.net>
Thu, 10 Oct 2002 10:28:04 +0000 (03:28 -0700)
drivers/input/keyboard/atkbd.c

index 8fa0d7957e4990b2bdf4403e6762f337cac6ecfc..f8e2b58763877377e6a5afa205b754921ad54373 100644 (file)
@@ -244,8 +244,9 @@ static int atkbd_command(struct atkbd *atkbd, unsigned char *param, int command)
 
        while (atkbd->cmdcnt && timeout--) udelay(10);
 
-       for (i = 0; i < receive; i++)
-               param[i] = atkbd->cmdbuf[(receive - 1) - i];
+       if (param)
+               for (i = 0; i < receive; i++)
+                       param[i] = atkbd->cmdbuf[(receive - 1) - i];
 
        if (atkbd->cmdcnt) 
                return (atkbd->cmdcnt = 0) - 1;