From patchwork Wed Jun 22 07:46:25 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Damian Hobson-Garcia X-Patchwork-Id: 903732 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p5M7jZAA023624 for ; Wed, 22 Jun 2011 07:45:35 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750975Ab1FVHpe (ORCPT ); Wed, 22 Jun 2011 03:45:34 -0400 Received: from mail-pw0-f46.google.com ([209.85.160.46]:62100 "EHLO mail-pw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750724Ab1FVHpe (ORCPT ); Wed, 22 Jun 2011 03:45:34 -0400 Received: by pwj7 with SMTP id 7so434742pwj.19 for ; Wed, 22 Jun 2011 00:45:33 -0700 (PDT) Received: by 10.68.20.163 with SMTP id o3mr158814pbe.366.1308728733629; Wed, 22 Jun 2011 00:45:33 -0700 (PDT) Received: from localhost.localdomain (mailhost.igel.co.jp [219.106.231.130]) by mx.google.com with ESMTPS id x2sm256306pbn.77.2011.06.22.00.45.31 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 22 Jun 2011 00:45:32 -0700 (PDT) From: Damian Hobson-Garcia To: lethal@linux-sh.org, linux-sh@vger.kernel.org, linux-fbdev@vger.kernel.org Cc: Magnus Damm , taki@igel.co.jp, matsu@igel.co.jp, Damian Hobson-Garcia Subject: [PATCH] fbdev: sh_mobile_meram: Correct pointer check for YCbCr chroma plane Date: Wed, 22 Jun 2011 16:46:25 +0900 Message-Id: <1308728785-9588-1-git-send-email-dhobsong@igel.co.jp> X-Mailer: git-send-email 1.7.1 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Wed, 22 Jun 2011 07:45:35 +0000 (UTC) The check was intended to test if we have a valid pointer to write into, but it mistakenly checks the pointer contents instead. Since a valid pointer is mandatory for the chroma data if a YCbCr format is used, the pointer check has been removed. Signed-off-by: Damian Hobson-Garcia --- Sorry, forgot to sign off the previous version. Resend drivers/video/sh_mobile_meram.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/video/sh_mobile_meram.c b/drivers/video/sh_mobile_meram.c index 216f7f7..a6f28b9 100644 --- a/drivers/video/sh_mobile_meram.c +++ b/drivers/video/sh_mobile_meram.c @@ -246,7 +246,7 @@ static inline void meram_get_next_icb_addr(struct sh_mobile_meram_info *pdata, icb_offset = 0xc0000000 | (cfg->current_reg << 23); *icb_addr_y = icb_offset | (cfg->icb[0].marker_icb << 24); - if ((*icb_addr_c) && is_nvcolor(cfg->pixelformat)) + if (is_nvcolor(cfg->pixelformat)) *icb_addr_c = icb_offset | (cfg->icb[1].marker_icb << 24); }