Skip to content

Commit d59b548

Browse files
nunojsadNechita
authored andcommitted
iiod: responder: drop useless iio_context_get_device()
In handle_free_buffer(), we get the device and then never use it. Moreover, the same is being done in the call to get_iio_buffer() so that there's really no point for it. Signed-off-by: Nuno Sa <noname.nuno@gmail.com>
1 parent 2eed97d commit d59b548

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

iiod/responder.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -553,15 +553,10 @@ static void handle_free_buffer(struct parser_pdata *pdata,
553553
struct iiod_command_data *cmd_data)
554554
{
555555
struct iiod_io *io = iiod_command_get_default_io(cmd_data);
556-
const struct iio_device *dev;
557556
struct buffer_entry *entry, *buf_entry;
558557
struct iio_buffer *buf;
559558
int ret = -ENODEV;
560559

561-
dev = iio_context_get_device(pdata->ctx, cmd->dev);
562-
if (!dev)
563-
goto out_send_response;
564-
565560
buf = get_iio_buffer(pdata, cmd, &buf_entry);
566561
ret = iio_err(buf);
567562
if (ret)

0 commit comments

Comments
 (0)