From: Mike Isely Date: Tue, 22 Apr 2008 17:45:39 +0000 (-0300) Subject: V4L/DVB (7306): pvrusb2: Fix oops possible when claiming a NULL stream X-Git-Tag: v2.6.26-rc1~1084^2~360 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=99a6acf9a7a80da49e85be964b15ffed9ab7643e;p=linux-2.6 V4L/DVB (7306): pvrusb2: Fix oops possible when claiming a NULL stream Signed-off-by: Mike Isely Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/pvrusb2/pvrusb2-context.c b/drivers/media/video/pvrusb2/pvrusb2-context.c index 160437b21e..2a6726e403 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-context.c +++ b/drivers/media/video/pvrusb2/pvrusb2-context.c @@ -173,7 +173,7 @@ int pvr2_channel_claim_stream(struct pvr2_channel *cp, int code = 0; pvr2_context_enter(cp->mc_head); do { if (sp == cp->stream) break; - if (sp->user) { + if (sp && sp->user) { code = -EBUSY; break; }