Showing error 1284

User: Jiri Slaby
Error type: Leaving function in locked state
Error type description: Some lock is not unlocked on all paths of a function, so it is leaked
File location: drivers/memstick/host/tifm_ms.c
Line in file: 250
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-05-21 20:30:05 UTC


Source:

220                         : tifm_ms_read_data(host, buf, p_cnt);
221
222                if (host->req->long_data) {
223                        kunmap_atomic(buf - p_off, KM_BIO_SRC_IRQ);
224                        local_irq_restore(flags);
225                }
226
227                if (!t_size)
228                        break;
229                host->block_pos += t_size;
230                length -= t_size;
231                off += t_size;
232        }
233
234        dev_dbg(&sock->dev, "fifo data transfer, %d remaining\n", length);
235        if (!length && (host->req->data_dir == WRITE)) {
236                if (host->io_pos) {
237                        writel(TIFM_MS_SYS_FDIR
238                               | readl(sock->addr + SOCK_MS_SYSTEM),
239                               sock->addr + SOCK_MS_SYSTEM);
240                        writel(host->io_word, sock->addr + SOCK_MS_DATA);
241                }
242                writel(TIFM_MS_SYS_FDIR
243                       | readl(sock->addr + SOCK_MS_SYSTEM),
244                       sock->addr + SOCK_MS_SYSTEM);
245                writel(0, sock->addr + SOCK_MS_DATA);
246        } else {
247                readl(sock->addr + SOCK_MS_DATA);
248        }
249
250        return length;
251}
252
253static int tifm_ms_issue_cmd(struct tifm_ms *host)
254{
255        struct tifm_dev *sock = host->dev;
256        unsigned char *data;
257        unsigned int data_len, cmd, sys_param;
258
259        host->cmd_flags = 0;
260        host->block_pos = 0;
Show full sources