HID: hid-steam: remove pointless error message
This error message doesn't really add any information. If modprobe fails then the user will already know what the error code is. In the case of kmalloc() it's a style violation to print an error message for that because kmalloc has it's own better error messages built in. Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Vicki Pfau <vi@endrift.com> Link: https://lore.kernel.org/r/305898fb-6bd4-4749-806c-05ec51bbeb80@moroto.mountain Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
This commit is contained in:
parent
fef018d819
commit
a966816996
@ -1109,10 +1109,9 @@ static int steam_probe(struct hid_device *hdev,
|
|||||||
return hid_hw_start(hdev, HID_CONNECT_DEFAULT);
|
return hid_hw_start(hdev, HID_CONNECT_DEFAULT);
|
||||||
|
|
||||||
steam = devm_kzalloc(&hdev->dev, sizeof(*steam), GFP_KERNEL);
|
steam = devm_kzalloc(&hdev->dev, sizeof(*steam), GFP_KERNEL);
|
||||||
if (!steam) {
|
if (!steam)
|
||||||
ret = -ENOMEM;
|
return -ENOMEM;
|
||||||
goto steam_alloc_fail;
|
|
||||||
}
|
|
||||||
steam->hdev = hdev;
|
steam->hdev = hdev;
|
||||||
hid_set_drvdata(hdev, steam);
|
hid_set_drvdata(hdev, steam);
|
||||||
spin_lock_init(&steam->lock);
|
spin_lock_init(&steam->lock);
|
||||||
@ -1179,9 +1178,6 @@ hid_hw_start_fail:
|
|||||||
cancel_work_sync(&steam->work_connect);
|
cancel_work_sync(&steam->work_connect);
|
||||||
cancel_delayed_work_sync(&steam->mode_switch);
|
cancel_delayed_work_sync(&steam->mode_switch);
|
||||||
cancel_work_sync(&steam->rumble_work);
|
cancel_work_sync(&steam->rumble_work);
|
||||||
steam_alloc_fail:
|
|
||||||
hid_err(hdev, "%s: failed with error %d\n",
|
|
||||||
__func__, ret);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user