From patchwork Thu May 25 20:26:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 9749099 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0B52E60246 for ; Thu, 25 May 2017 20:26:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ED62727B81 for ; Thu, 25 May 2017 20:26:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E136B283BD; Thu, 25 May 2017 20:26:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6F03A27B81 for ; Thu, 25 May 2017 20:26:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756083AbdEYU0a (ORCPT ); Thu, 25 May 2017 16:26:30 -0400 Received: from metis.ext.4.pengutronix.de ([92.198.50.35]:49841 "EHLO metis.ext.4.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751771AbdEYU03 (ORCPT ); Thu, 25 May 2017 16:26:29 -0400 Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1dDzL1-0004VY-Lj; Thu, 25 May 2017 22:26:27 +0200 Received: from ukl by ptx.hi.pengutronix.de with local (Exim 4.84_2) (envelope-from ) id 1dDzL0-0006Mo-PQ; Thu, 25 May 2017 22:26:26 +0200 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Tony Lindgren , Lee Jones Cc: linux-omap@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH] mfd: twl4030-irq: log an error in twl4030_sih_setup if the module cannot be found Date: Thu, 25 May 2017 22:26:21 +0200 Message-Id: <20170525202621.20169-1-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-omap@vger.kernel.org Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP As silently failing isn't that nice, emit an error message at a place that was silent on failure up to now. Signed-off-by: Uwe Kleine-König --- Hello, If the module cannot be found, twl4030_sih_setup returns -EINVAL. I wonder if -ENODEV would be more appropriate. Best regards Uwe --- drivers/mfd/twl4030-irq.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mfd/twl4030-irq.c b/drivers/mfd/twl4030-irq.c index b46c0cfc27d9..378c02d43bf7 100644 --- a/drivers/mfd/twl4030-irq.c +++ b/drivers/mfd/twl4030-irq.c @@ -638,8 +638,10 @@ int twl4030_sih_setup(struct device *dev, int module, int irq_base) } } - if (status < 0) + if (status < 0) { + dev_err(dev, "module to setup SIH for not found\n"); return status; + } agent = kzalloc(sizeof(*agent), GFP_KERNEL); if (!agent)