提交 b222cca6 编写于 作者: J Joe Perches 提交者: Matthew Garrett

platform:x86: Remove OOM message after input_allocate_device

Emitting an OOM message isn't necessary after input_allocate_device
as there's a generic OOM and a dump_stack already done.
Signed-off-by: NJoe Perches <joe@perches.com>
Signed-off-by: NMatthew Garrett <matthew.garrett@nebula.com>
上级 a825bc87
...@@ -1494,10 +1494,9 @@ static int asus_input_init(struct asus_laptop *asus) ...@@ -1494,10 +1494,9 @@ static int asus_input_init(struct asus_laptop *asus)
int error; int error;
input = input_allocate_device(); input = input_allocate_device();
if (!input) { if (!input)
pr_warn("Unable to allocate input device\n");
return -ENOMEM; return -ENOMEM;
}
input->name = "Asus Laptop extra buttons"; input->name = "Asus Laptop extra buttons";
input->phys = ASUS_LAPTOP_FILE "/input0"; input->phys = ASUS_LAPTOP_FILE "/input0";
input->id.bustype = BUS_HOST; input->id.bustype = BUS_HOST;
......
...@@ -1203,10 +1203,8 @@ static int eeepc_input_init(struct eeepc_laptop *eeepc) ...@@ -1203,10 +1203,8 @@ static int eeepc_input_init(struct eeepc_laptop *eeepc)
int error; int error;
input = input_allocate_device(); input = input_allocate_device();
if (!input) { if (!input)
pr_info("Unable to allocate input device\n");
return -ENOMEM; return -ENOMEM;
}
input->name = "Asus EeePC extra buttons"; input->name = "Asus EeePC extra buttons";
input->phys = EEEPC_LAPTOP_FILE "/input0"; input->phys = EEEPC_LAPTOP_FILE "/input0";
......
...@@ -570,10 +570,8 @@ static int ideapad_input_init(struct ideapad_private *priv) ...@@ -570,10 +570,8 @@ static int ideapad_input_init(struct ideapad_private *priv)
int error; int error;
inputdev = input_allocate_device(); inputdev = input_allocate_device();
if (!inputdev) { if (!inputdev)
pr_info("Unable to allocate input device\n");
return -ENOMEM; return -ENOMEM;
}
inputdev->name = "Ideapad extra buttons"; inputdev->name = "Ideapad extra buttons";
inputdev->phys = "ideapad/input0"; inputdev->phys = "ideapad/input0";
......
...@@ -66,10 +66,8 @@ static int mfld_pb_probe(struct platform_device *pdev) ...@@ -66,10 +66,8 @@ static int mfld_pb_probe(struct platform_device *pdev)
return -EINVAL; return -EINVAL;
input = input_allocate_device(); input = input_allocate_device();
if (!input) { if (!input)
dev_err(&pdev->dev, "Input device allocation error\n");
return -ENOMEM; return -ENOMEM;
}
input->name = pdev->name; input->name = pdev->name;
input->phys = "power-button/input0"; input->phys = "power-button/input0";
......
...@@ -490,11 +490,8 @@ static int acpi_pcc_init_input(struct pcc_acpi *pcc) ...@@ -490,11 +490,8 @@ static int acpi_pcc_init_input(struct pcc_acpi *pcc)
int error; int error;
input_dev = input_allocate_device(); input_dev = input_allocate_device();
if (!input_dev) { if (!input_dev)
ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
"Couldn't allocate input device for hotkey"));
return -ENOMEM; return -ENOMEM;
}
input_dev->name = ACPI_PCC_DRIVER_NAME; input_dev->name = ACPI_PCC_DRIVER_NAME;
input_dev->phys = ACPI_PCC_INPUT_PHYS; input_dev->phys = ACPI_PCC_INPUT_PHYS;
......
...@@ -9163,7 +9163,6 @@ static int __init thinkpad_acpi_module_init(void) ...@@ -9163,7 +9163,6 @@ static int __init thinkpad_acpi_module_init(void)
mutex_init(&tpacpi_inputdev_send_mutex); mutex_init(&tpacpi_inputdev_send_mutex);
tpacpi_inputdev = input_allocate_device(); tpacpi_inputdev = input_allocate_device();
if (!tpacpi_inputdev) { if (!tpacpi_inputdev) {
pr_err("unable to allocate input device\n");
thinkpad_acpi_module_exit(); thinkpad_acpi_module_exit();
return -ENOMEM; return -ENOMEM;
} else { } else {
......
...@@ -97,10 +97,8 @@ static int acpi_topstar_init_hkey(struct topstar_hkey *hkey) ...@@ -97,10 +97,8 @@ static int acpi_topstar_init_hkey(struct topstar_hkey *hkey)
int error; int error;
input = input_allocate_device(); input = input_allocate_device();
if (!input) { if (!input)
pr_err("Unable to allocate input device\n");
return -ENOMEM; return -ENOMEM;
}
input->name = "Topstar Laptop extra buttons"; input->name = "Topstar Laptop extra buttons";
input->phys = "topstar/input0"; input->phys = "topstar/input0";
......
...@@ -975,10 +975,8 @@ static int toshiba_acpi_setup_keyboard(struct toshiba_acpi_dev *dev) ...@@ -975,10 +975,8 @@ static int toshiba_acpi_setup_keyboard(struct toshiba_acpi_dev *dev)
u32 hci_result; u32 hci_result;
dev->hotkey_dev = input_allocate_device(); dev->hotkey_dev = input_allocate_device();
if (!dev->hotkey_dev) { if (!dev->hotkey_dev)
pr_info("Unable to register input device\n");
return -ENOMEM; return -ENOMEM;
}
dev->hotkey_dev->name = "Toshiba input device"; dev->hotkey_dev->name = "Toshiba input device";
dev->hotkey_dev->phys = "toshiba_acpi/input0"; dev->hotkey_dev->phys = "toshiba_acpi/input0";
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册