Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751666AbdFEMO2 (ORCPT ); Mon, 5 Jun 2017 08:14:28 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:32966 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751290AbdFEMO1 (ORCPT ); Mon, 5 Jun 2017 08:14:27 -0400 From: Arvind Yadav To: broonie@kernel.org Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] spi: davinci: Fix compilation warning. Date: Mon, 5 Jun 2017 17:44:09 +0530 Message-Id: X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 801 Lines: 26 If CONFIG_OF is disable, it'll through compilation warning. drivers/spi/spi-davinci.c: In function ‘spi_davinci_get_pdata’: drivers/spi/spi-davinci.c:880:2: warning: return makes pointer from integer without a cast [enabled by default] return -ENODEV; Signed-off-by: Arvind Yadav --- drivers/spi/spi-davinci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-davinci.c b/drivers/spi/spi-davinci.c index 2b0805d..93a4009 100644 --- a/drivers/spi/spi-davinci.c +++ b/drivers/spi/spi-davinci.c @@ -877,7 +877,7 @@ static int spi_davinci_get_pdata(struct platform_device *pdev, *spi_davinci_get_pdata(struct platform_device *pdev, struct davinci_spi *dspi) { - return -ENODEV; + return ERR_PTR(-ENODEV); } #endif -- 1.9.1