@@ -687,7 +687,7 @@ static int lenovo_probe_tpkbd(struct hid_device *hdev)
data_pointer = devm_kzalloc(&hdev->dev,
sizeof(*data_pointer),
GFP_KERNEL);
- if (data_pointer == NULL) {
+ if (!data_pointer) {
ret = -ENOMEM;
goto err;
}
@@ -698,7 +698,7 @@ static int lenovo_probe_tpkbd(struct hid_device *hdev)
name_mute = devm_kzalloc(&hdev->dev, name_sz, GFP_KERNEL);
name_micmute = devm_kzalloc(&hdev->dev, name_sz, GFP_KERNEL);
- if (name_mute == NULL || name_micmute == NULL) {
+ if (!name_mute || !name_micmute) {
hid_err(hdev, "Could not allocate memory for led data\n");
ret = -ENOMEM;
goto err;
@@ -823,7 +823,7 @@ static void lenovo_remove_tpkbd(struct hid_device *hdev)
* Only the trackpoint half of the keyboard has drvdata and stuff that
* needs unregistering.
*/
- if (data_pointer == NULL)
+ if (!data_pointer)
return;
sysfs_remove_group(&hdev->dev.kobj,