Skip to content

Commit

Permalink
iiod: usbd: Fix wrong null pointer check
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Cercueil <[email protected]>
  • Loading branch information
pcercuei committed May 28, 2019
1 parent 4e22517 commit bb9831a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion iiod/usbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ static int usb_open_pipe(struct usbd_pdata *pdata, unsigned int pipe_id)
return -EINVAL;

cpdata = malloc(sizeof(*cpdata));
if (!pdata)
if (!cpdata)
return -ENOMEM;

/* Either we open this pipe for the first time, or it was closed before.
Expand Down

0 comments on commit bb9831a

Please sign in to comment.