Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932504AbeAHNKq (ORCPT + 1 other); Mon, 8 Jan 2018 08:10:46 -0500 Received: from mout.web.de ([212.227.15.14]:52026 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932434AbeAHNKn (ORCPT ); Mon, 8 Jan 2018 08:10:43 -0500 Subject: [PATCH 3/3] misc/ibmasm: Adjust two function calls together with a variable assignment From: SF Markus Elfring To: kernel-janitors@vger.kernel.org, Andy Shevchenko , Anton Vasilyev , Arnd Bergmann , Greg Kroah-Hartman , Jiri Kosina Cc: LKML References: <842e4179-dbac-cd43-e320-c5009d896a28@users.sourceforge.net> Message-ID: <6123f351-5656-2955-5cf1-953dfac61c04@users.sourceforge.net> Date: Mon, 8 Jan 2018 14:10:38 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <842e4179-dbac-cd43-e320-c5009d896a28@users.sourceforge.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:Tdsgi08s0Zha0Vlj5v8Q6mxKAc0JWIx/98IFr9VzAkGnsN9NoO6 CPCOFsDXzJ8KA7VQcsXVLr7KxZwVwQZ5vCExvnK+kc7FwBPkQDhmCQjUCRYuWPWLsr6Ng90 S1CcQWi3W6aTgtGUbkLx1xtzM24qrlo+pAHuJS9EKIjykfDc5HZa3U7tuRWY7BefG+eshrf B6LP6bYb5adzksVQUvZqQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:KbxNVk1j0rE=:cm15V8Zmlt0rgc3RK09VD0 uy1hS4e7+kAR63e8SXzIn5eWaQXZBXp6Y27oXpCyeKFf2RexybAnMRRUJYsrs7kD910kP6kcd dpPHyXCxt3l0AZCB9XSHhK/uSx8BLbZrcxXEmqA2hqMpnzWcrj3IYTSQtOKGj4CY5vELmLe0t 2+qhVx1WY8K3syOW7dqoGDz+Tmk4K4LR8akoXXxOqFuROHA2ovb90sdahaQ+A48MuEPuqLOHJ D+XAdy3iLuzqlde+oytbcOFxe5FDDCN6GJixbrXCjxpkimQVMOUSAhDbpSkSRxjhqDYhiMh0I dua9GbCNToRJjHU/O9cIx0456t0JtZwWojAudSfByTWA0cgAHmk2CkCdgwdYrGnADGMcHaPJe DcV/IqYf113MpVq5dYa20xyhMUtgjDolLAwE+Dler3NBz/udbWylnRNyUK3d3nWX2Hr13m52d YLKVZoFEQxMI7MGWRWJdvY/qenBjvNsjjVGlKcd887Fzpqx/+XJViKSQicyDmI3Zlpxg8QL1M EJ5jxv/XaB10SmMCXfd66snbpVDj0NPYxuB+/hmTiHUdQiMc+avM/ISsIIdlNjyhldImd6MKR SKMWbxmpEYxVUUYdCwAffwEulfjJpcu5AfhFHNI7Oa29wzvm6Ls8hzrM7GqCvptoHidpGc1dG +a2/fHxpobIZE/bfvPJf8g1YzD0KvvdjgmHKjbIrkwVDvryE2mCyoTxuLYK39Ll01SvvYosIO JUpc9+7dZJo2bbE9/wY8aR8XAzTqEghtWv0R0CdmnYp1ZC/EB2gCPXrvRWKJkW11fPYV/wB+p IeTQ/bOPB0PyMhVimO4RZzfHbplI7FsNgPSPyr/SHTVH6Gd9GA= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: From: Markus Elfring Date: Mon, 8 Jan 2018 13:53:25 +0100 The script "checkpatch.pl" pointed information out like the following. ERROR: do not use assignment in if condition Thus fix the affected source code places. Signed-off-by: Markus Elfring --- drivers/misc/ibmasm/module.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/misc/ibmasm/module.c b/drivers/misc/ibmasm/module.c index 894397b1ee51..f4742044e0d1 100644 --- a/drivers/misc/ibmasm/module.c +++ b/drivers/misc/ibmasm/module.c @@ -64,14 +64,16 @@ MODULE_PARM_DESC(ibmasm_debug, " Set debug mode on or off"); static int ibmasm_init_one(struct pci_dev *pdev, const struct pci_device_id *id) { - int result; struct service_processor *sp; + int result = pci_enable_device(pdev); - if ((result = pci_enable_device(pdev))) { + if (result) { dev_err(&pdev->dev, "Failed to enable PCI device\n"); return result; } - if ((result = pci_request_regions(pdev, DRIVER_NAME))) { + + result = pci_request_regions(pdev, DRIVER_NAME); + if (result) { dev_err(&pdev->dev, "Failed to allocate PCI resources\n"); goto error_resources; } -- 2.15.1