From patchwork Thu Jun 10 07:46:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Leizhen \(ThunderTown\)" X-Patchwork-Id: 457813 Delivered-To: patch@linaro.org Received: by 2002:a02:735a:0:0:0:0:0 with SMTP id a26csp156257jae; Thu, 10 Jun 2021 00:46:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxpX7O601m2tCSFKA1sB+OtwcANIJEbpT8RJklFikoQdAbZ+fm53QBJcmYCgBhsSolLrp7Y X-Received: by 2002:a17:907:7b9d:: with SMTP id ne29mr3347912ejc.167.1623311171254; Thu, 10 Jun 2021 00:46:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623311171; cv=none; d=google.com; s=arc-20160816; b=iB1xNNqCcLB9dV1hJXjXHa/dsz3VUILbzLhNHVQ+Ao6gLlxwiwFkRa/8INrmBFFFQP aKK2UlYpd2XyyGmCLltcO8CaKaZZQA03xK3TBFwR63FdUWYxwIEcblVXGWGBxvViGHWi QqxipEQGMy6ml1JeQFQLRMVnxCbzspnbbBjbUiBFLpwhlQ0T3CdaXh1ofoTXehhDr6Dd j7Ad0QdgTDHCvY3QWrD/zzTTWWy3wLAS4RTzkyNXVlEPQ81db3NlG/FsfjrLtnmri8Gm dogmF6aT0tHAtDsED3FrK9IItrTrGBmTIO1oIBxE3CEOMzJjlJ5HEmCgLIzGdF16m003 QIFQ== 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 :message-id:date:subject:cc:to:from; bh=BVistbDCF39pBvmdkf1UPOW+yZvsM64xCqQCTnU530A=; b=bZUqSHCFVbeCcsLuJ4n9voelWkKl2qDFW2jiYuLQqlZfigg+AFOuuedavWiRgu/nNU TsaEjPvggEe5HOnpm9j/LzxzyRhw/wlZur60+015kn2eURhsZDVgYWOH/E8d2kgi8lOA HWrJvnq7rGdlwO16i5p8czQP5hvmO1SD/s+81kLYpYK3ZLMTjbA8mXMC+i/maMlj5j4Z kqJtD+opQ/iNQf3epm6PO9v2wYasZcUHQtMSogNGzCQ9sgBbqLjk2+qeLvqIgIF/ua3K H4HXj22m7IlJ/OFw3TwWiM89CE+tOA2B+lBEcKE9nLlMrieDskubirTyGMhm7D4ARzdQ m52g== 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: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j23si1755484ejn.74.2021.06.10.00.46.11 for ; Thu, 10 Jun 2021 00:46:11 -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 S230238AbhFJHsG (ORCPT ); Thu, 10 Jun 2021 03:48:06 -0400 Received: from szxga01-in.huawei.com ([45.249.212.187]:9061 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230212AbhFJHsF (ORCPT ); Thu, 10 Jun 2021 03:48:05 -0400 Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.55]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4G0wv95GJzzYsZV; Thu, 10 Jun 2021 15:43:17 +0800 (CST) Received: from dggpemm500006.china.huawei.com (7.185.36.236) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Thu, 10 Jun 2021 15:46:08 +0800 Received: from thunder-town.china.huawei.com (10.174.177.72) 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; Thu, 10 Jun 2021 15:46:07 +0800 From: Zhen Lei To: "James E . J . Bottomley" , "Martin K . Petersen" , linux-scsi CC: Zhen Lei Subject: [PATCH 1/1] scsi: aic94xx: remove unnecessary oom message Date: Thu, 10 Jun 2021 15:46:01 +0800 Message-ID: <20210610074601.15659-1-thunder.leizhen@huawei.com> X-Mailer: git-send-email 2.26.0.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.174.177.72] 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: X-Mailing-List: linux-scsi@vger.kernel.org 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 --- drivers/scsi/aic94xx/aic94xx_init.c | 4 +--- drivers/scsi/aic94xx/aic94xx_sds.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) -- 2.26.0.106.g9fadedd diff --git a/drivers/scsi/aic94xx/aic94xx_init.c b/drivers/scsi/aic94xx/aic94xx_init.c index a195bfe9eccc073..9edd6008bbdec03 100644 --- a/drivers/scsi/aic94xx/aic94xx_init.c +++ b/drivers/scsi/aic94xx/aic94xx_init.c @@ -725,10 +725,8 @@ static int asd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) asd_dev = &asd_pcidev_data[asd_id]; asd_ha = kzalloc(sizeof(*asd_ha), GFP_KERNEL); - if (!asd_ha) { - asd_printk("out of memory\n"); + if (!asd_ha) goto Err_put; - } asd_ha->pcidev = dev; asd_ha->sas_ha.dev = &asd_ha->pcidev->dev; asd_ha->sas_ha.lldd_ha = asd_ha; diff --git a/drivers/scsi/aic94xx/aic94xx_sds.c b/drivers/scsi/aic94xx/aic94xx_sds.c index 297a66770260ccf..1b46f0018e0bfe5 100644 --- a/drivers/scsi/aic94xx/aic94xx_sds.c +++ b/drivers/scsi/aic94xx/aic94xx_sds.c @@ -342,10 +342,8 @@ int asd_read_ocm(struct asd_ha_struct *asd_ha) return -1; dir = kmalloc(sizeof(*dir), GFP_KERNEL); - if (!dir) { - asd_printk("no memory for ocm dir\n"); + if (!dir) return -ENOMEM; - } err = asd_read_ocm_dir(asd_ha, dir, 0); if (err)