lkml.org 
[lkml]   [2005]   [May]   [24]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateTue, 24 May 2005 10:14:12 +0300
FromPekka Enberg <>
SubjectRe: [RFC][patch 2/7] v9fs: VFS file and directory operations (2.0-rc6)
Hi,

On 5/24/05, ericvh@gmail.com <ericvh@gmail.com> wrote:
> +static ssize_t
> +v9fs_file_write(struct file *filp, const char __user * data,
> +               size_t count, loff_t * offset)
> +{
> +       int ret = -1;
> +       char *buffer;
> +
> +       buffer = kmalloc(count, GFP_KERNEL);
> +       if (buffer == NULL) {
> +               BUG();

I think simply returning -ENOMEM is sufficient. BUG seems way too
aggressive. (Found this in other places as well.)

> +               return -ENOMEM;
> +       }

                    Pekka
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-05-24 09:20    [from the cache]
©2003-2008