From patchwork Wed Jun 22 07:43:09 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: 903722 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p5M7gPoO009365 for ; Wed, 22 Jun 2011 07:42:26 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750975Ab1FVHmY (ORCPT ); Wed, 22 Jun 2011 03:42:24 -0400 Received: from mail-pw0-f46.google.com ([209.85.160.46]:63925 "EHLO mail-pw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750724Ab1FVHmY (ORCPT ); Wed, 22 Jun 2011 03:42:24 -0400 Received: by pwj7 with SMTP id 7so433427pwj.19 for ; Wed, 22 Jun 2011 00:42:23 -0700 (PDT) Received: by 10.142.60.16 with SMTP id i16mr55137wfa.343.1308728543719; Wed, 22 Jun 2011 00:42:23 -0700 (PDT) Received: from localhost.localdomain (mailhost.igel.co.jp [219.106.231.130]) by mx.google.com with ESMTPS id k4sm255578pbl.75.2011.06.22.00.42.21 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 22 Jun 2011 00:42:23 -0700 (PDT) From: Damian Hobson-Garcia To: lethal@linux-sh.org, linux-sh@vger.kernel.org, linux-fbdev@viger.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:43:09 +0900 Message-Id: <1308728589-9547-1-git-send-email-dhobsong@igel.co.jp> X-Mailer: git-send-email 1.7.1 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Wed, 22 Jun 2011 07:42:26 +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. --- 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 7afd77a..6700140 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); }