]> err.no Git - linux-2.6/commitdiff
V4L/DVB (7306): pvrusb2: Fix oops possible when claiming a NULL stream
authorMike Isely <isely@pobox.com>
Tue, 22 Apr 2008 17:45:39 +0000 (14:45 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Thu, 24 Apr 2008 17:07:47 +0000 (14:07 -0300)
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/pvrusb2/pvrusb2-context.c

index 160437b21e6d3457490f2bd30dc9fdeed82d01b7..2a6726e403f0473a8ddf63fdbdec62175f759633 100644 (file)
@@ -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;
                }