From patchwork Sun May 2 14:42:45 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: 96351 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 o42Eh7WZ021235 for ; Sun, 2 May 2010 14:43:07 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756482Ab0EBOmv (ORCPT ); Sun, 2 May 2010 10:42:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:62688 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756336Ab0EBOmu (ORCPT ); Sun, 2 May 2010 10:42:50 -0400 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o42Egnml007533 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 2 May 2010 10:42:49 -0400 Received: from [10.11.9.212] (vpn-9-212.rdu.redhat.com [10.11.9.212]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o42EgkBJ027379 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 2 May 2010 10:42:48 -0400 Message-ID: <4BDD8F65.80602@redhat.com> Date: Sun, 02 May 2010 11:42:45 -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: In-Reply-To: X-Scanned-By: MIMEDefang 2.67 on 10.5.11.18 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 14:43:07 +0000 (UTC) diff --git a/linux/drivers/staging/tm6000/tm6000-video.c b/linux/drivers/staging/tm6000/tm6000-video.c --- a/linux/drivers/staging/tm6000/tm6000-video.c +++ b/linux/drivers/staging/tm6000/tm6000-video.c @@ -539,7 +539,7 @@ static inline int tm6000_isoc_copy(struc } } copied += len; - if (copied>=size) + if (copied >= size || !buf) break; // } }