In the Linux kernel, the following vulnerability has been resolved: platform/x86: classmate-laptop: Add missing NULL pointer checks In a few places in the Classmate laptop driver, code using the accel object may run before that object's address is stored in the driver data of the input device using it. For example, cmpcaccelsensitivitystorev4() is the "show" method of cmpcaccelsensitivityattrv4 which is added in cmpcacceladdv4(), before calling devsetdrvdata() for inputdev->dev. If the sysfs attribute is accessed prematurely, the devgetdrvdata(&inputdev->dev) call in in cmpcaccelsensitivitystorev4() returns NULL which leads to a NULL pointer dereference going forward. Moreover, sysfs attributes using the input device are added before initializing that device by cmpcaddacpinotifydevice() and if one of them is accessed before running that function, a NULL pointer dereference will occur. For example, cmpcaccelsensitivityattrv4 is added before calling cmpcaddacpinotifydevice() and if it is read prematurely, the devgetdrvdata(&acpi->dev) call in cmpcaccelsensitivityshow_v4() returns NULL which leads to a NULL pointer dereference going forward. Fix this by adding NULL pointer checks in all of the relevant places.