From patchwork Thu Dec 4 09:02:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarkko Nikula X-Patchwork-Id: 5436451 Return-Path: X-Original-To: patchwork-linux-spi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1834B9F319 for ; Thu, 4 Dec 2014 09:02:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6479020120 for ; Thu, 4 Dec 2014 09:02:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9F308202B8 for ; Thu, 4 Dec 2014 09:02:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753235AbaLDJCt (ORCPT ); Thu, 4 Dec 2014 04:02:49 -0500 Received: from mga11.intel.com ([192.55.52.93]:42212 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753049AbaLDJCs (ORCPT ); Thu, 4 Dec 2014 04:02:48 -0500 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 04 Dec 2014 01:02:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,514,1413270000"; d="scan'208";a="632528475" Received: from mylly.fi.intel.com (HELO mylly.fi.intel.com.) ([10.237.72.69]) by fmsmga001.fm.intel.com with ESMTP; 04 Dec 2014 01:02:46 -0800 From: Jarkko Nikula To: linux-spi@vger.kernel.org Cc: Mark Brown , Jarkko Nikula Subject: [PATCH] spi: core: Do not mangle error code from kthread_run() Date: Thu, 4 Dec 2014 11:02:25 +0200 Message-Id: <1417683745-26349-1-git-send-email-jarkko.nikula@linux.intel.com> X-Mailer: git-send-email 2.1.3 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP kthread_run() could return ERR_PTR(-EINTR) from kthread_create_on_node(). Return the actual error code in spi_init_queue() instead of mangling it to -ENOMEM. Signed-off-by: Jarkko Nikula --- drivers/spi/spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 50f20f243981..da7e6225b8f6 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -1001,7 +1001,7 @@ static int spi_init_queue(struct spi_master *master) dev_name(&master->dev)); if (IS_ERR(master->kworker_task)) { dev_err(&master->dev, "failed to create message pump task\n"); - return -ENOMEM; + return PTR_ERR(master->kworker_task); } init_kthread_work(&master->pump_messages, spi_pump_messages);