From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161121AbcBQRXk (ORCPT ); Wed, 17 Feb 2016 12:23:40 -0500 Received: from mail-pf0-f171.google.com ([209.85.192.171]:33551 "EHLO mail-pf0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965115AbcBQRXj (ORCPT ); Wed, 17 Feb 2016 12:23:39 -0500 Date: Wed, 17 Feb 2016 22:53:29 +0530 From: Amitoj Kaur Chawla To: linux-kernel@vger.kernel.org Cc: julia.lawall@lip6.fr Subject: [PATCH] goldfish: Return proper error code Message-ID: <20160217172329.GA9026@amitoj-Inspiron-3542> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This change has been made with the goal that kernel functions should return something more descriptive than -1 on failure. Change the return value on valid_batchbuffer_addr() failure from -1 to -EINVAL. Signed-off-by: Amitoj Kaur Chawla --- drivers/platform/goldfish/goldfish_pipe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/goldfish/goldfish_pipe.c b/drivers/platform/goldfish/goldfish_pipe.c index 9f6734c..6de6fd2 100644 --- a/drivers/platform/goldfish/goldfish_pipe.c +++ b/drivers/platform/goldfish/goldfish_pipe.c @@ -233,7 +233,7 @@ static int setup_access_params_addr(struct platform_device *pdev, dev->aps = aps; return 0; } else - return -1; + return -EINVAL; } /* A value that will not be set by qemu emulator */ -- 1.9.1