From: Monam Agarwal Date: Sun, 9 Mar 2014 05:28:08 +0000 (+0530) Subject: Staging: ft1000-usb: Fix Smatch Warning in ft1000_hw.c X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1633dc5ecc5424ba39b8e4721e5c0ba01af43323;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git Staging: ft1000-usb: Fix Smatch Warning in ft1000_hw.c This patch fixes following smatch warning: /drivers/staging/ft1000/ft1000-usb/ft1000_hw.c:1148 ft1000_proc_drvmsg() warn: returning -1 instead of -ENOMEM is sloppy Signed-off-by: Monam Agarwal Acked-by: Nick Kossifidis Signed-off-by: Peter P Waskiewicz Jr --- diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c index a433e33049b5..b6a77088cfe4 100644 --- a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c @@ -1145,7 +1145,7 @@ static int ft1000_proc_drvmsg(struct ft1000_usb *dev, u16 size) char *cmdbuffer = kmalloc(1600, GFP_KERNEL); if (!cmdbuffer) - return -1; + return -ENOMEM; status = ft1000_read_dpram32(dev, 0x200, cmdbuffer, size);