From patchwork Sun Jun 30 11:22:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vadim Pasternak X-Patchwork-Id: 11024315 X-Patchwork-Delegate: andy.shevchenko@gmail.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5719B138B for ; Sun, 30 Jun 2019 11:23:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4562528567 for ; Sun, 30 Jun 2019 11:23:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 35D5628737; Sun, 30 Jun 2019 11:23:07 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI,UNPARSEABLE_RELAY 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 C9AA128567 for ; Sun, 30 Jun 2019 11:23:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726513AbfF3LXG (ORCPT ); Sun, 30 Jun 2019 07:23:06 -0400 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:39658 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726500AbfF3LXG (ORCPT ); Sun, 30 Jun 2019 07:23:06 -0400 Received: from Internal Mail-Server by MTLPINE2 (envelope-from vadimp@mellanox.com) with ESMTPS (AES256-SHA encrypted); 30 Jun 2019 14:23:00 +0300 Received: from r-build-lowlevel.mtr.labs.mlnx. (r-build-lowlevel.mtr.labs.mlnx [10.209.0.190]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id x5UBMxe5001195; Sun, 30 Jun 2019 14:22:59 +0300 From: Vadim Pasternak To: andy.shevchenko@gmail.com, dvhart@infradead.org Cc: platform-driver-x86@vger.kernel.org, Vadim Pasternak Subject: [PATCH v1 platform-next/based on branch review-andy 1/platform/x86: mlx-platform: Fix exit point on ioport map failure Date: Sun, 30 Jun 2019 11:22:58 +0000 Message-Id: <20190630112258.25219-1-vadimp@mellanox.com> X-Mailer: git-send-email 2.11.0 Sender: platform-driver-x86-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In case of devm_ioport_map() failure go to 'fail_alloc' exit point instead of wrong 'fail_platform_mux_register' exit point in mlxplat_init(). Signed-off-by: Vadim Pasternak Reported-by: kbuild test robot Fixes: ef58891a57d0 (platform/x86: mlx-platform: Move regmap initialization before all drivers activation) --- drivers/platform/x86/mlx-platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/mlx-platform.c b/drivers/platform/x86/mlx-platform.c index 262fa6b1282b..2b98f299faa4 100644 --- a/drivers/platform/x86/mlx-platform.c +++ b/drivers/platform/x86/mlx-platform.c @@ -2100,7 +2100,7 @@ static int __init mlxplat_init(void) mlxplat_lpc_resources[1].start, 1); if (!mlxplat_mlxcpld_regmap_ctx.base) { err = -ENOMEM; - goto fail_platform_mux_register; + goto fail_alloc; } if (!mlxplat_regmap_config)