From patchwork Fri Jan 14 09:39:11 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: axel lin X-Patchwork-Id: 477861 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p0E9deGw010002 for ; Fri, 14 Jan 2011 09:39:40 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752909Ab1ANJjQ (ORCPT ); Fri, 14 Jan 2011 04:39:16 -0500 Received: from mail-gw0-f46.google.com ([74.125.83.46]:57503 "EHLO mail-gw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754892Ab1ANJjB (ORCPT ); Fri, 14 Jan 2011 04:39:01 -0500 Received: by gwj20 with SMTP id 20so1040528gwj.19 for ; Fri, 14 Jan 2011 01:39:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:subject:from:to:cc:content-type:date:message-id :mime-version:x-mailer:content-transfer-encoding; bh=eOzq53+PVXR3xjnk6W+BQSJnRgRAovBSKyy6BfTCH6M=; b=Xv8FsyC5yMfe9mh1VDgPSFCKaJrkzYyY118DAqGJkcpM75qO51v9LZNWVQ7DagOe4J 3ZsF0aUtyHVRKlr1bo+ZAtaui9C0RJ+ICApSoVk1YWZHIhCNfdjKM+blURssqlDyfX/h r8AnO3igUWSpNi1FwlV5hAPqRU0qfeY5QUwC0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; b=w+s3A1FDYOs0JbPUgsf+P6tma/LkNla2Oqn6F1MMJ7ihhvB6LB0roXSXJWYui1a/ek SY80hkmGEfilpPzD5dVT5M2g29AupeVc9upSCh041qRV2WMJdkXiO6QAi0MzfwCQsShT LzA5sPgxua807xtfWUzRwg386D9BsALPfStwI= Received: by 10.151.10.9 with SMTP id n9mr980188ybi.32.1294997940345; Fri, 14 Jan 2011 01:39:00 -0800 (PST) Received: from [192.168.100.50] (60-251-136-127.HINET-IP.hinet.net [60.251.136.127]) by mx.google.com with ESMTPS id k2sm657741ybj.22.2011.01.14.01.38.56 (version=SSLv3 cipher=RC4-MD5); Fri, 14 Jan 2011 01:38:59 -0800 (PST) Subject: [PATCH] video: pxa3xx-gcu: Return -EFAULT when copy_from_user() fails From: Axel Lin To: linux-kernel@vger.kernel.org Cc: Daniel Mack , Janine Kropp , Denis Oliver Kropp , Eric Miao , linux-fbdev@vger.kernel.org Date: Fri, 14 Jan 2011 17:39:11 +0800 Message-Id: <1294997951.12295.1.camel@mola> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.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 (demeter1.kernel.org [140.211.167.41]); Fri, 14 Jan 2011 09:40:09 +0000 (UTC) diff --git a/drivers/video/pxa3xx-gcu.c b/drivers/video/pxa3xx-gcu.c index b81168d..cf4beb9 100644 --- a/drivers/video/pxa3xx-gcu.c +++ b/drivers/video/pxa3xx-gcu.c @@ -1,5 +1,5 @@ /* - * pxa3xx-gc.c - Linux kernel module for PXA3xx graphics controllers + * pxa3xx-gcu.c - Linux kernel module for PXA3xx graphics controllers * * This driver needs a DirectFB counterpart in user space, communication * is handled via mmap()ed memory areas and an ioctl. @@ -421,7 +421,7 @@ pxa3xx_gcu_misc_write(struct file *filp, const char *buff, buffer->next = priv->free; priv->free = buffer; spin_unlock_irqrestore(&priv->spinlock, flags); - return ret; + return -EFAULT; } buffer->length = words;