Message ID | 20210616063714.778-7-thunder.leizhen@huawei.com |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a02:735a:0:0:0:0:0 with SMTP id a26csp312873jae; Tue, 15 Jun 2021 23:37:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJweDH2x3dsLRtz9hkIJPxFcV9CU1Hl5dsT4vztnmWaDTIkE308tkNksCU3g3Ilwp4ouSrfD X-Received: by 2002:a17:906:3884:: with SMTP id q4mr3753014ejd.66.1623825478739; Tue, 15 Jun 2021 23:37:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623825478; cv=none; d=google.com; s=arc-20160816; b=Akz+lCOX6scbkE6QRUuQL++EJPFR2ZcgcGI/qDjEKi/Ui0ggN2vlmDR6Ftu50DHWEy zB0v0urWZrfykGzIvJ+6ik0xBA0qxK7U9rWyrtZjC3awGGgZdsJ+zctqb3AqAQIp16Lh 2axjrTlww7Xr/lvCaX2G20sAClAyjf9X4cBNFHdTNpY+5609uNcM7vQj5i9xK9ERKL4P HhYIVBHXIelcl19Su59qNcThv4xGAxd9b4x4uvLZwOT62W94sjnoJoTfJhlMkCLrF671 uqtARs/wO+6rxtDAu1bScFXXoSYLNnvXwDC0IWRYBF/N8+Lt9T30oETFyXA0NqtDQJVE qA+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=v1SpQjrN4qsESVQlTtQNhRMKSOxXhxYSZyN7B+iDNh0=; b=XXMPAmjgWSOCAZ25dTFZVwHWIRxFjq8UG8hKWqTSjq9q0ZJRal/QCLSt8gnZU7td1l HqHgBHtUqRD57PpfRcbiqXncWNtPVZn2F9/hvS1P1QJxPytWeB87F14qvwyCIZW9Fs3W SgcSp6KrQbt07SS+XcUcCU40r31N5TFnsumCQbmtNHBTqdpdZpzfvgXVmMnRYZbPKRQj S6hXLbN32qG50FVQUISazyGePyezon7T9GmsI1sHaAez4qlK/oVSDBN1NZN2wHM5zTAk q6wuicjoiIO3t3Mimcp+VV+MzqvYiknaBumii1STuDNrzlHgr93ApOd5/sW5u6ls/0wf Uoxw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: <linux-scsi-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z16si1386040edb.194.2021.06.15.23.37.58 for <patch@linaro.org>; Tue, 15 Jun 2021 23:37:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231441AbhFPGkD (ORCPT <rfc822;patch@linaro.org>); Wed, 16 Jun 2021 02:40:03 -0400 Received: from szxga01-in.huawei.com ([45.249.212.187]:10087 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231409AbhFPGkC (ORCPT <rfc822; linux-scsi@vger.kernel.org>); Wed, 16 Jun 2021 02:40:02 -0400 Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4G4b5c04drzZf6V; Wed, 16 Jun 2021 14:35:00 +0800 (CST) Received: from dggpemm500006.china.huawei.com (7.185.36.236) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Wed, 16 Jun 2021 14:37:55 +0800 Received: from thunder-town.china.huawei.com (10.174.179.0) by dggpemm500006.china.huawei.com (7.185.36.236) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Wed, 16 Jun 2021 14:37:54 +0800 From: Zhen Lei <thunder.leizhen@huawei.com> To: Vishal Bhakta <vbhakta@vmware.com>, VMware PV-Drivers <pv-drivers@vmware.com>, Karan Tilak Kumar <kartilak@cisco.com>, "Sesidhar Baddela" <sebaddel@cisco.com>, Nilesh Javali <njavali@marvell.com>, GR-QLogic-Storage-Upstream <GR-QLogic-Storage-Upstream@marvell.com>, "Adaptec OEM Raid Solutions" <aacraid@microsemi.com>, Brian King <brking@us.ibm.com>, Satish Kharat <satishkh@cisco.com>, Hannes Reinecke <hare@suse.de>, "Manish Rangankar" <mrangankar@marvell.com>, Adam Radford <aradford@gmail.com>, "James E . J . Bottomley" <jejb@linux.ibm.com>, "Martin K . Petersen" <martin.petersen@oracle.com>, linux-scsi <linux-scsi@vger.kernel.org> CC: Zhen Lei <thunder.leizhen@huawei.com> Subject: [PATCH v2 06/20] scsi: devinfo: remove unnecessary oom message Date: Wed, 16 Jun 2021 14:37:00 +0800 Message-ID: <20210616063714.778-7-thunder.leizhen@huawei.com> X-Mailer: git-send-email 2.26.0.windows.1 In-Reply-To: <20210616063714.778-1-thunder.leizhen@huawei.com> References: <20210616063714.778-1-thunder.leizhen@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.174.179.0] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpemm500006.china.huawei.com (7.185.36.236) X-CFilter-Loop: Reflected Precedence: bulk List-ID: <linux-scsi.vger.kernel.org> X-Mailing-List: linux-scsi@vger.kernel.org |
Series |
scsi: remove unnecessary oom message
|
expand
|
diff --git a/drivers/scsi/scsi_devinfo.c b/drivers/scsi/scsi_devinfo.c index d33355ab6e14505..a8adbbbfddba44b 100644 --- a/drivers/scsi/scsi_devinfo.c +++ b/drivers/scsi/scsi_devinfo.c @@ -357,10 +357,8 @@ int scsi_dev_info_list_add_keyed(int compatible, char *vendor, char *model, return PTR_ERR(devinfo_table); devinfo = kmalloc(sizeof(*devinfo), GFP_KERNEL); - if (!devinfo) { - printk(KERN_ERR "%s: no memory\n", __func__); + if (!devinfo) return -ENOMEM; - } scsi_strcpy_devinfo("vendor", devinfo->vendor, sizeof(devinfo->vendor), vendor, compatible);
Fixes scripts/checkpatch.pl warning: WARNING: Possible unnecessary 'out of memory' message Remove it can help us save a bit of memory. Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com> --- drivers/scsi/scsi_devinfo.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 2.26.0.106.g9fadedd