We weren't checking whether the resource was in use before calling
res_free(), so applications which called STREAMOFF on a v4l2 device that
wasn't already streaming would cause a BUG() to be hit (MythTV).
Reported-by: Larry Finger <email@example.com>
Reported-by: Jay Harbeston <firstname.lastname@example.org>
Signed-off-by: Devin Heitmueller <email@example.com>
Signed-off-by: Mauro Carvalho Chehab <firstname.lastname@example.org>
(cherry picked from commit a595c1ce4c9d572cf53513570b9f1a263d7867f2)