Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 704b3f4c authored by Markus Elfring's avatar Markus Elfring Committed by Mauro Carvalho Chehab
Browse files

[media] stk-webcam: Delete an unnecessary check before the function call "vfree"



The vfree() function performs also input parameter validation.
Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent d585c1e1
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -556,10 +556,8 @@ static int stk_free_sio_buffers(struct stk_camera *dev)
	nbufs = dev->n_sbufs;
	dev->n_sbufs = 0;
	spin_unlock_irqrestore(&dev->spinlock, flags);
	for (i = 0; i < nbufs; i++) {
		if (dev->sio_bufs[i].buffer != NULL)
	for (i = 0; i < nbufs; i++)
		vfree(dev->sio_bufs[i].buffer);
	}
	kfree(dev->sio_bufs);
	dev->sio_bufs = NULL;
	return 0;