All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Cc: linux-arm-kernel@lists.arm.linux.org.uk,
	linux-omap@vger.kernel.org, linux@arm.linux.org.uk
Subject: Re: [PATCH 02/10] OMAP: iommu: add initial debugfs support
Date: Fri, 28 Aug 2009 11:24:00 -0700	[thread overview]
Message-ID: <20090828182400.GO25828@atomide.com> (raw)
In-Reply-To: <20090827.102539.246514996.Hiroshi.DOYU@nokia.com>

* Hiroshi DOYU <Hiroshi.DOYU@nokia.com> [090827 00:26]:
> Hi Tony,
> 
> I fixed the error exit path as below and attached the updated verion
> of the patch. Please replace the old one in for-next with the attached
> one.

OK will update.

Tony

> 	Modified arch/arm/plat-omap/iommu-debug.c
> diff --git a/arch/arm/plat-omap/iommu-debug.c b/arch/arm/plat-omap/iommu-debug.c
> index 5a7e409..c799b3b 100644
> --- a/arch/arm/plat-omap/iommu-debug.c
> +++ b/arch/arm/plat-omap/iommu-debug.c
> @@ -268,14 +268,14 @@ static ssize_t debug_read_mem(struct file *file, char __user *userbuf,
>  
>  	area = find_iovm_area(obj, (u32)ppos);
>  	if (IS_ERR(area)) {
> -		mutex_unlock(&iommu_debug_lock);
> -		return -EINVAL;
> +		bytes = -EINVAL;
> +		goto err_out;
>  	}
>  	memcpy(p, area->va, count);
>  	p += count;
>  
>  	bytes = simple_read_from_buffer(userbuf, count, ppos, buf, p - buf);
> -
> +err_out:
>  	mutex_unlock(&iommu_debug_lock);
>  	free_page((unsigned long)buf);
>  
> @@ -299,17 +299,17 @@ static ssize_t debug_write_mem(struct file *file, const char __user *userbuf,
>  	mutex_lock(&iommu_debug_lock);
>  
>  	if (copy_from_user(p, userbuf, count)) {
> -		mutex_unlock(&iommu_debug_lock);
> -		return -EFAULT;
> +		count =  -EFAULT;
> +		goto err_out;
>  	}
>  
>  	area = find_iovm_area(obj, (u32)ppos);
>  	if (IS_ERR(area)) {
> -		mutex_unlock(&iommu_debug_lock);
> -		return -EINVAL;
> +		count = -EINVAL;
> +		goto err_out;
>  	}
>  	memcpy(area->va, p, count);
> -
> +err_out:
>  	mutex_unlock(&iommu_debug_lock);
>  	free_page((unsigned long)buf);
>  



  reply	other threads:[~2009-08-28 18:24 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-12 12:10 [PATCH 00/10] Omap3 updates for upcoming 2.6.32 merge window Tony Lindgren
2009-08-12 12:12 ` [PATCH 01/10] OMAP: iommu: fix wrong argument in flush_cache_vmap() Tony Lindgren
2009-08-13  9:21   ` Russell King - ARM Linux
2009-08-12 12:13 ` [PATCH 02/10] OMAP: iommu: add initial debugfs support Tony Lindgren
2009-08-13  9:23   ` Russell King - ARM Linux
2009-08-15 12:06     ` Hiroshi DOYU
2009-08-16 15:13       ` Tony Lindgren
2009-08-16 20:47         ` Russell King - ARM Linux
2009-08-17  4:19           ` Hiroshi DOYU
2009-08-17  7:28           ` Hiroshi DOYU
2009-08-27  7:25             ` Hiroshi DOYU
2009-08-28 18:24               ` Tony Lindgren [this message]
2009-08-12 12:14 ` [PATCH 03/10] OMAP2/3: Pass irqflags to 8250 driver Tony Lindgren
2009-08-12 12:16 ` [PATCH 04/10] OMAP3: 3430SDP: Fix defconfig Tony Lindgren
2009-08-13  9:24   ` Russell King - ARM Linux
2009-08-12 12:17 ` [PATCH 05/10] OMAP3: rx51_defconfig: add twl4030 to rx51 default configuration Tony Lindgren
2009-08-13  9:24   ` Russell King - ARM Linux
2009-08-12 12:18 ` [PATCH 06/10] OMAP3: MMC: Add mux for pins Tony Lindgren
2009-08-13  9:26   ` Russell King - ARM Linux
2009-08-16 15:25     ` [PATCH 06/10] OMAP3: MMC: Add mux for pins, v2 Tony Lindgren
2009-08-12 12:20 ` [PATCH 07/10] OMAP3: Zoom2: Add TWL4030 support Tony Lindgren
2009-08-13  9:27   ` Russell King - ARM Linux
2009-08-16 15:28     ` [PATCH 07/10] OMAP3: Zoom2: Add TWL4030 support,v 2 Tony Lindgren
2009-08-12 12:21 ` [PATCH 08/10] OMAP3: Zoom2: Update board defconfig Tony Lindgren
2009-08-13  9:28   ` Russell King - ARM Linux
2009-08-12 12:22 ` [PATCH 09/10] OMAP3: beagle: add missing twl4030 usb platform_data Tony Lindgren
2009-08-13  9:28   ` Russell King - ARM Linux
2009-08-12 12:24 ` [PATCH 10/10] OMAP3: update OMAP3 Beagle defconfig Tony Lindgren
2009-08-12 12:27   ` Felipe Balbi
2009-08-12 16:52     ` [PATCH 10/10] OMAP3: update OMAP3 Beagle defconfig, v2 Tony Lindgren
2009-08-12 17:20       ` Kevin Hilman
2009-08-12 19:11         ` Felipe Balbi
2009-08-13  7:02           ` Tony Lindgren
2009-08-16  1:48             ` Eric Witcher
2009-08-16 15:42               ` [PATCH 10/10] OMAP3: update OMAP3 Beagle defconfig, v3 Tony Lindgren
2009-08-16 17:07                 ` Felipe Balbi
2009-08-16 17:22                   ` Tony Lindgren
2009-08-19 13:40                 ` Felipe Balbi
2009-08-24 13:05 ` [PATCH 00/10] Omap3 updates for upcoming 2.6.32 merge window Tony Lindgren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090828182400.GO25828@atomide.com \
    --to=tony@atomide.com \
    --cc=Hiroshi.DOYU@nokia.com \
    --cc=linux-arm-kernel@lists.arm.linux.org.uk \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.