aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-cp2112.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hid/hid-cp2112.c')
-rw-r--r--drivers/hid/hid-cp2112.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/hid/hid-cp2112.c b/drivers/hid/hid-cp2112.c
index a822db5a8338..3318de690e00 100644
--- a/drivers/hid/hid-cp2112.c
+++ b/drivers/hid/hid-cp2112.c
@@ -1069,8 +1069,7 @@ static int cp2112_probe(struct hid_device *hdev, const struct hid_device_id *id)
1069 return ret; 1069 return ret;
1070 1070
1071err_gpiochip_remove: 1071err_gpiochip_remove:
1072 if (gpiochip_remove(&dev->gc) < 0) 1072 gpiochip_remove(&dev->gc);
1073 hid_err(hdev, "error removing gpio chip\n");
1074err_free_i2c: 1073err_free_i2c:
1075 i2c_del_adapter(&dev->adap); 1074 i2c_del_adapter(&dev->adap);
1076err_free_dev: 1075err_free_dev:
@@ -1089,8 +1088,7 @@ static void cp2112_remove(struct hid_device *hdev)
1089 struct cp2112_device *dev = hid_get_drvdata(hdev); 1088 struct cp2112_device *dev = hid_get_drvdata(hdev);
1090 1089
1091 sysfs_remove_group(&hdev->dev.kobj, &cp2112_attr_group); 1090 sysfs_remove_group(&hdev->dev.kobj, &cp2112_attr_group);
1092 if (gpiochip_remove(&dev->gc)) 1091 gpiochip_remove(&dev->gc);
1093 hid_err(hdev, "unable to remove gpio chip\n");
1094 i2c_del_adapter(&dev->adap); 1092 i2c_del_adapter(&dev->adap);
1095 /* i2c_del_adapter has finished removing all i2c devices from our 1093 /* i2c_del_adapter has finished removing all i2c devices from our
1096 * adapter. Well behaved devices should no longer call our cp2112_xfer 1094 * adapter. Well behaved devices should no longer call our cp2112_xfer