From patchwork Tue May 16 18:55:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 9729557 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 8E732602DB for ; Tue, 16 May 2017 18:56:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7FECB289A8 for ; Tue, 16 May 2017 18:56:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 74AE6289C3; Tue, 16 May 2017 18:56:25 +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 2F6A0289A8 for ; Tue, 16 May 2017 18:56:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752719AbdEPS4M (ORCPT ); Tue, 16 May 2017 14:56:12 -0400 Received: from mout.web.de ([217.72.192.78]:60706 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751011AbdEPS4I (ORCPT ); Tue, 16 May 2017 14:56:08 -0400 Received: from [192.168.1.3] ([77.182.68.193]) by smtp.web.de (mrweb101 [213.165.67.124]) with ESMTPSA (Nemesis) id 0Lu52Q-1eAxFz31zq-011QYF; Tue, 16 May 2017 20:55:57 +0200 Subject: [PATCH 2/2] sh/intc: Delete an error message for a failed memory allocation in add_virq_to_pirq() From: SF Markus Elfring To: linux-sh@vger.kernel.org, Andrew Morton , Jan Kara , Johannes Weiner , Rich Felker , Yoshinori Sato Cc: LKML , kernel-janitors@vger.kernel.org, Wolfram Sang References: Message-ID: <54e30d61-5183-9911-cf35-1410fb78da5a@users.sourceforge.net> Date: Tue, 16 May 2017 20:55:54 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Provags-ID: V03:K0:kzDB29zjQKX8uZ2U3ObQcP1wB4vi+9S4htxq+ZPW4wxs9VrY+bW WFcXJ1WwfamFIERWUWvl/6K1h4R5ABqp/8hMiVa10l5GhyORrlgFG6+eEyGogxGp1F4ZCzh 5CVHZ09IHY0viRbEbFDtepF7WLNdz/bEanV6R/KrsG6w7O2q+6mskW8X+lpq0y+T/pUUjzZ vdYGqUgLs3twoMvW5+Zig== X-UI-Out-Filterresults: notjunk:1; V01:K0:oioSuZZurC8=:Ae9l3RKrGOF0+vvmosljSS 1kG7fX+JOMP3sKsLMtVOFMtAkgV84BVJLdRm8ki2rn09XHn80J1jQnrMf5HUYHn+BQ4nSPVtY WyrVyCKhHaB2K2o2jEDCxE0mUs38qZB6jIVDcsTrT8bY4Icxp85b4jDSryF6IrpZ0uuf7X+xk 8n7VPypR6E7UenYkUTISUOnMFEwJ4DKamTU+m7dYI8RbkygYTYxd8Wm8ZrCA6AaqaeSW5mANN CZsdPKtvyDzyv0z5f8Iib+POYQNBKTgcuAJzUn3cevpecH79arrIuQNxg2ctPuvxUJdk82lXj giAyjSBGG6z9LzWqPJBaMnzHZePMgK5E7ZOjbKx34cT3cNN1mpJ946p/vQLoY6Ihxp0vXrXQO USUdefK2lkhCvZRusGqftBpdXb9GBZGaLqOhg6f5FhAELmOca/Y3X9QTXLFIy18ZEcZv4Nk93 F7wkWI1cBgjq6+JC2wuSMg6O1sB9Vrv7qk+2qZGu/BuFv7ArXoSDyMH5Mg08uMloCZUFWeqN9 1ZsXIzhSkblAl9aC3ViTl+4oRyR93P+czEsQVm+E6JOA2la2VRj0spWb/X3WEe4A9jy47Id23 UDul5XHgCc1DRXY195UUXwf2A5eXvAd+iMHlVNSMYGS3/516UHcOyX+pFSw9E9ja1oqx5Oybo BBroMxG0iecGqAxOuhPUpoK3ZFjTQVLCCneCQirKKOX0oog9CSO/VMRsR7mnxann1M5dSXwID uUuIHeRRRKyTKKRe9lWxt8vFrNHxnpqFyp5KyX5jdlvgfQtIuJg2otIzSQazVwcJErUmdWQpv ePErk1y Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Tue, 16 May 2017 20:23:43 +0200 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Signed-off-by: Markus Elfring --- drivers/sh/intc/virq.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/sh/intc/virq.c b/drivers/sh/intc/virq.c index 2079425c95ed..79d733f3411a 100644 --- a/drivers/sh/intc/virq.c +++ b/drivers/sh/intc/virq.c @@ -97,7 +97,5 @@ static int add_virq_to_pirq(unsigned int irq, unsigned int virq) - if (!entry) { - pr_err("can't allocate VIRQ mapping for %d\n", virq); + if (!entry) return -ENOMEM; - } entry->irq = virq;