inode.c (712cba5d87a6c0e980ee5fad45734e189c4d7151) | inode.c (cbbd26b8b1a6af9c02e2b6523e12bd50cc765059) |
---|---|
1/* 2 * inode.c -- user mode filesystem api for usb gadget controllers 3 * 4 * Copyright (C) 2003-2004 David Brownell 5 * Copyright (C) 2003 Agilent Technologies 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by --- 653 unchanged lines hidden (view full) --- 662 } 663 664 buf = kmalloc(len, GFP_KERNEL); 665 if (unlikely(!buf)) { 666 mutex_unlock(&epdata->lock); 667 return -ENOMEM; 668 } 669 | 1/* 2 * inode.c -- user mode filesystem api for usb gadget controllers 3 * 4 * Copyright (C) 2003-2004 David Brownell 5 * Copyright (C) 2003 Agilent Technologies 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by --- 653 unchanged lines hidden (view full) --- 662 } 663 664 buf = kmalloc(len, GFP_KERNEL); 665 if (unlikely(!buf)) { 666 mutex_unlock(&epdata->lock); 667 return -ENOMEM; 668 } 669 |
670 if (unlikely(copy_from_iter(buf, len, from) != len)) { | 670 if (unlikely(!copy_from_iter_full(buf, len, from))) { |
671 value = -EFAULT; 672 goto out; 673 } 674 675 if (unlikely(!configured)) { 676 value = ep_config(epdata, buf, len); 677 } else if (is_sync_kiocb(iocb)) { 678 value = ep_io(epdata, buf, len); --- 1378 unchanged lines hidden --- | 671 value = -EFAULT; 672 goto out; 673 } 674 675 if (unlikely(!configured)) { 676 value = ep_config(epdata, buf, len); 677 } else if (is_sync_kiocb(iocb)) { 678 value = ep_io(epdata, buf, len); --- 1378 unchanged lines hidden --- |