Message ID | 20210610080015.16027-1-thunder.leizhen@huawei.com (mailing list archive) |
---|---|
State | Changes Requested |
Headers | show |
Series | [1/1] scsi: libsas: remove unnecessary oom message | expand |
diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c index 4aa1fda95f35dd4..a1c7e2c42c5c378 100644 --- a/drivers/scsi/libsas/sas_ata.c +++ b/drivers/scsi/libsas/sas_ata.c @@ -552,10 +552,8 @@ int sas_ata_init(struct domain_device *found_dev) int rc; ata_host = kzalloc(sizeof(*ata_host), GFP_KERNEL); - if (!ata_host) { - pr_err("ata host alloc failed.\n"); + if (!ata_host) return -ENOMEM; - } ata_host_init(ata_host, ha->dev, &sas_sata_ops);
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/libsas/sas_ata.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)