aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/platform/x86/asus-laptop.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c
index 6aba24618416..b756e07d41b4 100644
--- a/drivers/platform/x86/asus-laptop.c
+++ b/drivers/platform/x86/asus-laptop.c
@@ -1124,7 +1124,7 @@ static int asus_input_init(struct asus_laptop *asus)
1124 input = input_allocate_device(); 1124 input = input_allocate_device();
1125 if (!input) { 1125 if (!input) {
1126 pr_info("Unable to allocate input device\n"); 1126 pr_info("Unable to allocate input device\n");
1127 return 0; 1127 return -ENOMEM;
1128 } 1128 }
1129 input->name = "Asus Laptop extra buttons"; 1129 input->name = "Asus Laptop extra buttons";
1130 input->phys = ASUS_LAPTOP_FILE "/input0"; 1130 input->phys = ASUS_LAPTOP_FILE "/input0";
@@ -1135,20 +1135,20 @@ static int asus_input_init(struct asus_laptop *asus)
1135 error = sparse_keymap_setup(input, asus_keymap, NULL); 1135 error = sparse_keymap_setup(input, asus_keymap, NULL);
1136 if (error) { 1136 if (error) {
1137 pr_err("Unable to setup input device keymap\n"); 1137 pr_err("Unable to setup input device keymap\n");
1138 goto err_keymap; 1138 goto err_free_dev;
1139 } 1139 }
1140 error = input_register_device(input); 1140 error = input_register_device(input);
1141 if (error) { 1141 if (error) {
1142 pr_info("Unable to register input device\n"); 1142 pr_info("Unable to register input device\n");
1143 goto err_device; 1143 goto err_free_keymap;
1144 } 1144 }
1145 1145
1146 asus->inputdev = input; 1146 asus->inputdev = input;
1147 return 0; 1147 return 0;
1148 1148
1149err_keymap: 1149err_free_keymap:
1150 sparse_keymap_free(input); 1150 sparse_keymap_free(input);
1151err_device: 1151err_free_dev:
1152 input_free_device(input); 1152 input_free_device(input);
1153 return error; 1153 return error;
1154} 1154}