From patchwork Sun May 2 17:26:27 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 96371 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o42HQaJl023872 for ; Sun, 2 May 2010 17:26:36 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757472Ab0EBR0f (ORCPT ); Sun, 2 May 2010 13:26:35 -0400 Received: from mail-vw0-f46.google.com ([209.85.212.46]:58389 "EHLO mail-vw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757139Ab0EBR0e (ORCPT ); Sun, 2 May 2010 13:26:34 -0400 Received: by vws19 with SMTP id 19so1236886vws.19 for ; Sun, 02 May 2010 10:26:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=J9uWzIi4Dq4jjO1dY4y2AIcF/0A0ekO8ICuMYWdY0jE=; b=N6l/kdpg8cDqs3l1xSvIXCwuhQT9AGOldHMwPeEu1Ws1RZmubXwK9qnbTc2MD2Jg5b AFKw1D2YAnYtqchcXmyNeh0MrtIQ7d16UBD5YmlU9hTsmwyG+aFsdcJ/Hbe0aIH9JADg 5z6wflRqwxsgDYWASJSTgi28JJR0flpOGU08Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=F/HNaF6rlb/d4cg+qWoR7A31WFoLLC7Hsj67qHX1Ce84xSoZrFiupMVNQ42zefNRbO x0gFwmcfx6SXklnukJP8jOoq98OX5r0dKhPVIP0MLPdYf++gIEqgicn3HEhIYouq/Ih6 BqYu6BajIwMrOdkYmnKxnVB3+fCdPXSoW6Fyc= Received: by 10.220.123.67 with SMTP id o3mr9543360vcr.176.1272821193640; Sun, 02 May 2010 10:26:33 -0700 (PDT) Received: from [192.168.30.170] (200-158-180-81.dsl.telesp.net.br [200.158.180.81]) by mx.google.com with ESMTPS id w29sm19599619vcr.2.2010.05.02.10.26.29 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 02 May 2010 10:26:31 -0700 (PDT) Message-ID: <4BDDB5C3.6020306@gmail.com> Date: Sun, 02 May 2010 14:26:27 -0300 From: Mauro Carvalho Chehab User-Agent: Thunderbird 2.0.0.22 (X11/20090609) MIME-Version: 1.0 To: Bee Hock Goh CC: LMML Subject: Re: [PATCH] tm6000: Prevent Kernel Oops changing channel when stream is still on. References: <4BDD8F65.80602@redhat.com> In-Reply-To: <4BDD8F65.80602@redhat.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Sun, 02 May 2010 17:26:37 +0000 (UTC) Index: work.x86-64/drivers/staging/tm6000/tm6000-video.c =================================================================== --- work.x86-64.orig/drivers/staging/tm6000/tm6000-video.c +++ work.x86-64/drivers/staging/tm6000/tm6000-video.c @@ -395,6 +395,8 @@ HEADER: jiffies); return rc; } + if (!*buf) + return 0; } return 0; @@ -528,7 +530,7 @@ static inline int tm6000_isoc_copy(struc } } copied += len; - if (copied>=size) + if (copied >= size || !buf) break; // } }