From patchwork Thu May 27 14:43:26 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Henrique Fagundes X-Patchwork-Id: 102702 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 o4REhTPu018816 for ; Thu, 27 May 2010 14:43:29 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757839Ab0E0On2 (ORCPT ); Thu, 27 May 2010 10:43:28 -0400 Received: from mail-gw0-f46.google.com ([74.125.83.46]:38055 "EHLO mail-gw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757707Ab0E0On1 (ORCPT ); Thu, 27 May 2010 10:43:27 -0400 Received: by gwaa12 with SMTP id a12so11420gwa.19 for ; Thu, 27 May 2010 07:43:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=y6herV1MPr8U+VVsWwjtifZnF999409l/W9lQRmmWd0=; b=fgkm6uxZKEy5QAQT3s2UMkEayFFFtX6YTRvjpMCSTLQ3dzp7Rj/zItAHH1Ot9YhHuC 7h5zwvgKw3ITnFutbZPQbGZVqLIKYBR1HZUHyb+E1S84WUHPSfl7uq+OjlDu0X9ZL/VI OKtLNOIESHwC/RVgX28sVmPAqXox+iFfz2Bng= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; b=ke0tBhjZ9HVh/mdSH+IQr4IHzd3bjcWdZGj14bWgOyVsq4VooTPMXBGubVRKr/Ntaw SO9FEcU13FZDK5Pq2cOC3kG4/GFHj8Xmq4e8nWKsqRmt1joqQSlGGxablpayCOz4Wrzk bvvMXM7rsi476QtZksAZXuWWvbMEU4qP+IXdk= MIME-Version: 1.0 Received: by 10.151.115.13 with SMTP id s13mr218864ybm.313.1274971406827; Thu, 27 May 2010 07:43:26 -0700 (PDT) Received: by 10.150.201.1 with HTTP; Thu, 27 May 2010 07:43:26 -0700 (PDT) Date: Thu, 27 May 2010 11:43:26 -0300 X-Google-Sender-Auth: wr5QoDBPf7UsIgPzGc2_bk0VNwU Message-ID: Subject: Re: [PATCH 3/4] tm6000: bugfix video image From: Luis Henrique Fagundes To: Linux Media Mailing List , Dmitri Belimov , Mauro Carvalho Chehab , Bee Hock Goh , Stefan Ringel 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]); Thu, 27 May 2010 14:43:30 +0000 (UTC) --- a/drivers/staging/tm6000/tm6000-video.c 2010-05-26 09:13:19.000000000 -0300 +++ b/drivers/staging/tm6000/tm6000-video.c 2010-05-26 09:12:29.000000000 -0300 @@ -423,7 +423,7 @@ jiffies); return rc; } + if (!buf) - if (!*buf) return 0; } @@ -452,7 +452,7 @@ while (len>0) { cpysize=min(len,buf->vb.size-pos); //printk("Copying %d bytes (max=%lu) from %p to %p[%u]\n",cpysize,(*buf)->vb.size,ptr,out_p,pos); - memcpy(&out_p[pos], ptr, cpysize); + memcpy(&outp[pos], ptr, cpysize); pos+=cpysize; ptr+=cpysize; len-=cpysize; @@ -464,8 +464,8 @@ get_next_buf (dma_q, &buf); if (!buf) break; - out_p = videobuf_to_vmalloc(&(buf->vb)); - if (!out_p) + outp = videobuf_to_vmalloc(&(buf->vb)); + if (!outp) return rc; pos = 0; }