aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/genwqe/card_dev.c1
-rw-r--r--drivers/misc/mei/client.c11
-rw-r--r--drivers/misc/mic/host/mic_virtio.c3
-rw-r--r--drivers/misc/sgi-gru/grukdump.c11
4 files changed, 17 insertions, 9 deletions
diff --git a/drivers/misc/genwqe/card_dev.c b/drivers/misc/genwqe/card_dev.c
index 8f8a6b327cdb..2c2c9cc75231 100644
--- a/drivers/misc/genwqe/card_dev.c
+++ b/drivers/misc/genwqe/card_dev.c
@@ -787,6 +787,7 @@ static int genwqe_pin_mem(struct genwqe_file *cfile, struct genwqe_mem *m)
787 if (rc != 0) { 787 if (rc != 0) {
788 dev_err(&pci_dev->dev, 788 dev_err(&pci_dev->dev,
789 "[%s] genwqe_user_vmap rc=%d\n", __func__, rc); 789 "[%s] genwqe_user_vmap rc=%d\n", __func__, rc);
790 kfree(dma_map);
790 return rc; 791 return rc;
791 } 792 }
792 793
diff --git a/drivers/misc/mei/client.c b/drivers/misc/mei/client.c
index 1d3720697618..9ac72f1ea6b9 100644
--- a/drivers/misc/mei/client.c
+++ b/drivers/misc/mei/client.c
@@ -908,7 +908,6 @@ void mei_cl_all_disconnect(struct mei_device *dev)
908 list_for_each_entry_safe(cl, next, &dev->file_list, link) { 908 list_for_each_entry_safe(cl, next, &dev->file_list, link) {
909 cl->state = MEI_FILE_DISCONNECTED; 909 cl->state = MEI_FILE_DISCONNECTED;
910 cl->mei_flow_ctrl_creds = 0; 910 cl->mei_flow_ctrl_creds = 0;
911 cl->read_cb = NULL;
912 cl->timer_count = 0; 911 cl->timer_count = 0;
913 } 912 }
914} 913}
@@ -942,8 +941,16 @@ void mei_cl_all_wakeup(struct mei_device *dev)
942void mei_cl_all_write_clear(struct mei_device *dev) 941void mei_cl_all_write_clear(struct mei_device *dev)
943{ 942{
944 struct mei_cl_cb *cb, *next; 943 struct mei_cl_cb *cb, *next;
944 struct list_head *list;
945 945
946 list_for_each_entry_safe(cb, next, &dev->write_list.list, list) { 946 list = &dev->write_list.list;
947 list_for_each_entry_safe(cb, next, list, list) {
948 list_del(&cb->list);
949 mei_io_cb_free(cb);
950 }
951
952 list = &dev->write_waiting_list.list;
953 list_for_each_entry_safe(cb, next, list, list) {
947 list_del(&cb->list); 954 list_del(&cb->list);
948 mei_io_cb_free(cb); 955 mei_io_cb_free(cb);
949 } 956 }
diff --git a/drivers/misc/mic/host/mic_virtio.c b/drivers/misc/mic/host/mic_virtio.c
index 752ff873f891..7e1ef0ebbb80 100644
--- a/drivers/misc/mic/host/mic_virtio.c
+++ b/drivers/misc/mic/host/mic_virtio.c
@@ -156,7 +156,8 @@ static int mic_vringh_copy(struct mic_vdev *mvdev, struct vringh_kiov *iov,
156static int _mic_virtio_copy(struct mic_vdev *mvdev, 156static int _mic_virtio_copy(struct mic_vdev *mvdev,
157 struct mic_copy_desc *copy) 157 struct mic_copy_desc *copy)
158{ 158{
159 int ret = 0, iovcnt = copy->iovcnt; 159 int ret = 0;
160 u32 iovcnt = copy->iovcnt;
160 struct iovec iov; 161 struct iovec iov;
161 struct iovec __user *u_iov = copy->iov; 162 struct iovec __user *u_iov = copy->iov;
162 void __user *ubuf = NULL; 163 void __user *ubuf = NULL;
diff --git a/drivers/misc/sgi-gru/grukdump.c b/drivers/misc/sgi-gru/grukdump.c
index 9b2062d17327..2bef3f76032a 100644
--- a/drivers/misc/sgi-gru/grukdump.c
+++ b/drivers/misc/sgi-gru/grukdump.c
@@ -139,8 +139,11 @@ static int gru_dump_context(struct gru_state *gru, int ctxnum,
139 139
140 ubuf += sizeof(hdr); 140 ubuf += sizeof(hdr);
141 ubufcch = ubuf; 141 ubufcch = ubuf;
142 if (gru_user_copy_handle(&ubuf, cch)) 142 if (gru_user_copy_handle(&ubuf, cch)) {
143 goto fail; 143 if (cch_locked)
144 unlock_cch_handle(cch);
145 return -EFAULT;
146 }
144 if (cch_locked) 147 if (cch_locked)
145 ubufcch->delresp = 0; 148 ubufcch->delresp = 0;
146 bytes = sizeof(hdr) + GRU_CACHE_LINE_BYTES; 149 bytes = sizeof(hdr) + GRU_CACHE_LINE_BYTES;
@@ -179,10 +182,6 @@ static int gru_dump_context(struct gru_state *gru, int ctxnum,
179 ret = -EFAULT; 182 ret = -EFAULT;
180 183
181 return ret ? ret : bytes; 184 return ret ? ret : bytes;
182
183fail:
184 unlock_cch_handle(cch);
185 return -EFAULT;
186} 185}
187 186
188int gru_dump_chiplet_request(unsigned long arg) 187int gru_dump_chiplet_request(unsigned long arg)