Received: by 10.223.176.5 with SMTP id f5csp1213727wra; Fri, 2 Feb 2018 13:15:37 -0800 (PST) X-Google-Smtp-Source: AH8x224ybYftG9wq3svinwOPMA6rQcoH6UnDOF6jUOY9JbDXNHCnRfgcSbm31HrpSIuYDR7vXFt5 X-Received: by 10.99.106.202 with SMTP id f193mr32516751pgc.115.1517606137526; Fri, 02 Feb 2018 13:15:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517606137; cv=none; d=google.com; s=arc-20160816; b=Qg0b1QQp9yd/qX2Yfp0aEuJ2VNM5vUfyIXhsViVG5CmjHpwYUnMwLeMB+12fZaDNo8 ojxSVMvgdGkz60Xwn7UTFG5KK+sv8GjaY1bl5XB3VzJ10/XTPCE9nc3qAGS9Z/+wze8N mQp1N1/jGOtAlyB53aiKbx7aMYA4zsZU7xTxxEUDC8UgqsIbKYuaqndyGMnuz/BD3tDt vs9U5v+v+d/LuV6ZXyHMx49ADr/5qpOP/jB6jtMOwNFhsbOLdTj3ah6JLe7vf0jJC0A/ gqWZpNHZDw/EP+h7/pLIwa31ndeRdJ7IfJuDZQwZSK3C1uxqkm2ShB01uB2uPjuYGTic iuOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:mime-version:user-agent:date:message-id:subject :from:cc:to:arc-authentication-results; bh=08QNfptghJP4x+3KxfRYmeCZ06rD6sXe+/UeBKX49cQ=; b=FHNI+9D17NrtZA8VYx4oguo9PyhD1ZU7FYHm/4aZMrakcM0Ca1XmXE239A4ZnWDMaS rMzwhNrYp6hPdpgylE4fCIUKT2hqNPntiRed3djsTcJGUmjKrVa/mN87ygpcvckVQ59g D9bpLlU1PtX85+3IHO4cfzfNtEiP3b4ToPYs/v26QZBEvo/EspkJUYZJncqBuAl4Xp6/ p3RCR3TxhNwymEYWywQRVpBarYuzsZCVi+2TIAiYfu2Mi8wFA/C1TWXpAmFtAi2cBzF1 kcz37x4006hJeTNC4+2rDzSSjIcTFCeGphpGElmTsaeFxYCA010hJkvpuEPevx59OGw+ JytA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=sourceforge.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q19si1987199pgc.321.2018.02.02.13.15.22; Fri, 02 Feb 2018 13:15:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=sourceforge.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752104AbeBBUZv (ORCPT + 99 others); Fri, 2 Feb 2018 15:25:51 -0500 Received: from mout.web.de ([212.227.15.4]:55301 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752089AbeBBUZo (ORCPT ); Fri, 2 Feb 2018 15:25:44 -0500 Received: from [192.168.1.2] ([92.228.169.238]) by smtp.web.de (mrweb004 [213.165.67.108]) with ESMTPSA (Nemesis) id 0Lvf5Q-1en33W0vfg-017Qqn; Fri, 02 Feb 2018 21:25:38 +0100 To: kernel-janitors@vger.kernel.org, Arvind Yadav , Sebastian Reichel Cc: LKML From: SF Markus Elfring Subject: [PATCH] hsi_char: Delete an error message for a failed memory allocation in hsc_probe() Message-ID: Date: Fri, 2 Feb 2018 21:25:36 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:4fiiH1LFs9qE6Bu8ykYD36J3STOy5n8NXuN6YRCmbWzzp73RYDi kAMd4S3VfqYWXqtMeaPgG28q6uRLImzaN31ISG8G8QFu0suYfqPkJJJ0xEwJrbJyMgC3Abp EYZI+AYA/zwD6Y7JWbsJ5i0EOR4Pw5KeNpgvNEJWb3s0/b8M7o8WahufrH9PQpPB3UEPJ4I Wp9ohogrSsagpZk7wcGeA== X-UI-Out-Filterresults: notjunk:1;V01:K0:86eCPAQGUF0=:rliDbfvNqwNhzpGIwXWSPl wALdbPlVTMng+J5qrB/jGIWONzJLhrzCkJMoGHyq46B8yALVLL0cfzXAKmHQciLvBhci20cCv 06ZOf7cCx7mXQ9IoufAo5BGQeYAWHaGBAZ8qlSeV2sj5DBnXZFGPKqu0Y6rA/7jdGetxnEKL6 60rifRq7KF52yA/T8TDKYE1dKGAguSJcO39Dmgx87Y/0FjTBalKRxcYLvUtCzDGVQ6MYww26z IG7UWAmKe4greBG83FFT24a+uCB/6b8UsvIvwah9hODnhbzGxdeLcmTxCTDcwCngt4sWHbkRK N3Lxi51GjCaKNtIIvw3IN8Yt/VA8Ear6+3xtVl3uHMPfwB0d5s+aBE9n6deRT5q+g2b/wNyUu uV73KjXQLtxMr+d7NEBiIDoT3tsHY3qf56q0enzazYHs4NBVgEiSvmiSKsIGJA2G1EzAQVOMS /uxWPDTqmbCSyEdSzu5mo4MJLqPU5v2KbYwQtVL04iRPEPPx04LJVLpeU8VE67Acx3kvoCb1y XbVDAOrSAtiM8OY8cuhhBvO1lI4HFqwIswW1p9wDmh1Y5S53ypKtdnLgR1QwXr+lFqX8ru3bn aZZryCEpYG45LAaC+6PRsoe7xZnNCM+cixKyOFYdURQ6+dfATf/kz1QZUcFI8965kS8BaJ4WD zgMNGJARkuh64fKHQBnxAFKAuYnLS25ukCaICoX/d1trByLdRBAROLNY3b9T0HY6wxUy4kbqE zmQxXLrRcpKWzVIMXw0f5VozECucRZRvjb2/EhSFm7xXUfUA5GMa9LlGEK0oNO68ffMHaa8dF 86pNKqfNVvgra2OqMdkDHqCVNvIDyaMjlaKJnwQibVixWWxChQ= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Markus Elfring Date: Fri, 2 Feb 2018 21:21:12 +0100 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/hsi/clients/hsi_char.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/hsi/clients/hsi_char.c b/drivers/hsi/clients/hsi_char.c index cf9c2a332ad8..9d2a6d64dfb8 100644 --- a/drivers/hsi/clients/hsi_char.c +++ b/drivers/hsi/clients/hsi_char.c @@ -697,10 +697,9 @@ static int hsc_probe(struct device *dev) int i; cl_data = kzalloc(sizeof(*cl_data), GFP_KERNEL); - if (!cl_data) { - dev_err(dev, "Could not allocate hsc_client_data\n"); + if (!cl_data) return -ENOMEM; - } + hsc_baseminor = HSC_BASEMINOR(hsi_id(cl), hsi_port_id(cl)); if (!hsc_major) { ret = alloc_chrdev_region(&hsc_dev, hsc_baseminor, -- 2.16.1