Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 328317
b: refs/heads/master
c: ee5e8d8
h: refs/heads/master
i:
  328315: b03017e
v: v3
  • Loading branch information
Szymon Janc authored and Samuel Ortiz committed Sep 27, 2012
1 parent 9186faf commit 564b37f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fe235b58d517d623bf6d40c77afca1b0ee6fc85d
refs/heads/master: ee5e8d812ca25bf95a97b4368aec4e680678e75e
15 changes: 8 additions & 7 deletions trunk/drivers/nfc/pn533.c
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ static int pn533_send_cmd_frame_async(struct pn533 *dev,
void *arg, gfp_t flags)
{
struct pn533_cmd *cmd;
int rc;
int rc = 0;

nfc_dev_dbg(&dev->interface->dev, "%s", __func__);

Expand All @@ -729,16 +729,16 @@ static int pn533_send_cmd_frame_async(struct pn533 *dev,
if (!rc)
dev->cmd_pending = 1;

mutex_unlock(&dev->cmd_lock);

return rc;
goto unlock;
}

nfc_dev_dbg(&dev->interface->dev, "%s Queueing command", __func__);

cmd = kzalloc(sizeof(struct pn533_cmd), flags);
if (!cmd)
return -ENOMEM;
if (!cmd) {
rc = -ENOMEM;
goto unlock;
}

INIT_LIST_HEAD(&cmd->queue);
cmd->out_frame = out_frame;
Expand All @@ -750,9 +750,10 @@ static int pn533_send_cmd_frame_async(struct pn533 *dev,

list_add_tail(&cmd->queue, &dev->cmd_queue);

unlock:
mutex_unlock(&dev->cmd_lock);

return 0;
return rc;
}

struct pn533_sync_cmd_response {
Expand Down

0 comments on commit 564b37f

Please sign in to comment.