From 1633dc5ecc5424ba39b8e4721e5c0ba01af43323 Mon Sep 17 00:00:00 2001 From: Monam Agarwal Date: Sun, 9 Mar 2014 10:58:08 +0530 Subject: [PATCH] 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 --- drivers/staging/ft1000/ft1000-usb/ft1000_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.20.1