Message ID | 7f9e0982-90b9-0e74-4732-7e3153813b2b@users.sourceforge.net (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
> WARNING: Possible unnecessary 'out of memory' message
I have noticed a moment ago that a similar change is also contained
in the update suggestion “HID: Remove unnecessary OOM messages”
by Joe Perches from 2017-03-01.
https://patchwork.kernel.org/patch/9598997/
https://lkml.kernel.org/r/<0fbe692283802d36df389af7cbda9a4bff44db5e.1488395879.git.joe@perches.com>
How would you like to continue with source code adjustments there?
Regards,
Markus
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/hid/hid-sensor-hub.c b/drivers/hid/hid-sensor-hub.c index 349494fc8def..feb4bb8ee3ec 100644 --- a/drivers/hid/hid-sensor-hub.c +++ b/drivers/hid/hid-sensor-hub.c @@ -640,10 +640,8 @@ static int sensor_hub_probe(struct hid_device *hdev, struct hid_sensor_hub_device *collection_hsdev = NULL; sd = devm_kzalloc(&hdev->dev, sizeof(*sd), GFP_KERNEL); - if (!sd) { - hid_err(hdev, "cannot allocate Sensor data\n"); + if (!sd) return -ENOMEM; - } hid_set_drvdata(hdev, sd); sd->quirks = id->driver_data; @@ -678,7 +676,6 @@ static int sensor_hub_probe(struct hid_device *hdev, sizeof(*sd->hid_sensor_hub_client_devs), GFP_KERNEL); if (sd->hid_sensor_hub_client_devs == NULL) { - hid_err(hdev, "Failed to allocate memory for mfd cells\n"); ret = -ENOMEM; goto err_stop_hw; } @@ -692,7 +689,6 @@ static int sensor_hub_probe(struct hid_device *hdev, hsdev = devm_kzalloc(&hdev->dev, sizeof(*hsdev), GFP_KERNEL); if (!hsdev) { - hid_err(hdev, "cannot allocate hid_sensor_hub_device\n"); ret = -ENOMEM; goto err_stop_hw; }