Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp1589903img; Tue, 19 Mar 2019 10:55:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqxbrQOjSxyVpcnzZYEFCayTb9hnLEKX/RiqUFlCqJymIce7Nj3o9vcWSZcmERXj8gvVyLCx X-Received: by 2002:a17:902:9884:: with SMTP id s4mr3340345plp.110.1553018144755; Tue, 19 Mar 2019 10:55:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553018144; cv=none; d=google.com; s=arc-20160816; b=AJDsju1Yx4BJw2QsxxcVGgngrjUYaBeD9C+N5zhujgoib7zhKONm+XJa8Kyk3gLK1V XyfAM5QUYD6Lgk7SyAcPwGIYr/8Olk487f5KjLh3N/U/VefjFzYZF0bc0ix/s6+fVSNu Nj0mFlHrC8Ww/5/7zv4IrzweUKp5igynxYn+4RThXSjHHyxhBrDa3d52iYnvnNYPN1OJ AqZTh4Sj+M9eiXHqQTaBlcA2YSHQAqP62uXId0oOnQZoNNFHrEjinmL1e2FWw3UlwzY6 IEwbsfmD4KW8h8aQk3680dJPYxSW6dFAmpf/7qzw5xBX3h9V8NISMk1dXmo5wBsdJtZX uFGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=3fJr7CYIWAIuCwF2YPSemsHiI7aKe0WGtBY6/le+AN8=; b=GPYJ7m7mhgrNNmWhesyhhFolSnP+Z6YO9P/UfALMnY9r4Q6is0CuneapT3eIekgmhI LinmH0feEFwyiDVqL3v1CaIVigvjYX5FWJr98RFnQ1AMrjJENRqEsg6uePM9FQSFCNYU lp0NAIgjqNC++Wauac/8R7451IQFDyJJcUc6gL95kWYpuS89zAyMhhvyNu4E144U5ca0 ZBlmWEVWuN7x9cxTRuUgk1ZY3Ridb0HtClMCzNqPVSZI+oZRcxGg1sGGT5m87xX2a2tp h7yavf8vZjQ52MEmeK6H/NJRwlvy6FJOr3V3A3TEaKnw75cH5fX4lkDkG7eGbOJr52zz dQBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@umn.edu header.s=google header.b=FSWfcCdY; 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=pass (p=NONE sp=NONE dis=NONE) header.from=umn.edu Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s11si4584602plp.326.2019.03.19.10.55.29; Tue, 19 Mar 2019 10:55:44 -0700 (PDT) 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; dkim=pass header.i=@umn.edu header.s=google header.b=FSWfcCdY; 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=pass (p=NONE sp=NONE dis=NONE) header.from=umn.edu Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727559AbfCSRya (ORCPT + 99 others); Tue, 19 Mar 2019 13:54:30 -0400 Received: from mta-p5.oit.umn.edu ([134.84.196.205]:38010 "EHLO mta-p5.oit.umn.edu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726926AbfCSRya (ORCPT ); Tue, 19 Mar 2019 13:54:30 -0400 Received: from localhost (unknown [127.0.0.1]) by mta-p5.oit.umn.edu (Postfix) with ESMTP id AE0D89B7 for ; Tue, 19 Mar 2019 17:54:28 +0000 (UTC) X-Virus-Scanned: amavisd-new at umn.edu Received: from mta-p5.oit.umn.edu ([127.0.0.1]) by localhost (mta-p5.oit.umn.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id f1jHTbzMr8Ky for ; Tue, 19 Mar 2019 12:54:28 -0500 (CDT) Received: from mail-it1-f198.google.com (mail-it1-f198.google.com [209.85.166.198]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mta-p5.oit.umn.edu (Postfix) with ESMTPS id 62D6BCA6 for ; Tue, 19 Mar 2019 12:54:28 -0500 (CDT) Received: by mail-it1-f198.google.com with SMTP id i4so18044980itb.1 for ; Tue, 19 Mar 2019 10:54:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=umn.edu; s=google; h=from:to:cc:subject:date:message-id; bh=3fJr7CYIWAIuCwF2YPSemsHiI7aKe0WGtBY6/le+AN8=; b=FSWfcCdYX34FTYAAfrprrJb95ZAZiO3nmLCvcq0AuP88U7ELNkJ5zre2p30vjurs36 TSmBE8vK7PSGOZSTU1q8vCd3EHaDvBN+rvpMYLV5Cz/CL/EuFkb1vfCrC1zsSfnxBZc5 ZukpfFa8D8dUChsjPWf89QMauNgE0Fcl7USBuIvWlRHP7ZESXTCfzKtzZ2mMdE6EGrtX jGJxPNP8yPh0G6Vv0RT90zrnQmSRccQMDHQtB1bjGdKWa+blZa6Rqy2IAH5lNcE9xZtp oueyxwk7bB1hS/Ct+dhkJwtEr9wkaUqB/wJJsUxekOt18HrWwzg9A+mZUU6mx/YkvJd/ mWRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=3fJr7CYIWAIuCwF2YPSemsHiI7aKe0WGtBY6/le+AN8=; b=TnpdvHbuhNHtS95KhCWJwAjGf5zzpRsFLwQjsh3KxlG5Wjrvhwe2jX60gzZ7Qp4Yvy uercReddhZwasi5PNfur4wcGAoexbkZ+SXbSf3C2WhRFGRJJY6ReoPoNvJkjyOkiclMh QT54YUHGg/lMc8Tj+ubT/RvLg0QHYqHO1+c2v2wR1Ax/5kd0IK8PP/G7HjzeCjildh3X V4pkG8h1ZMMEv7xirXDnWiz4WQpbi0HUMPhb5rgKHQ1+oFwPlcBsTwXM6CkfHbAktNLa 10vjYsx7j9ltT6bJ0FLw9QqRrgiMx9HFHCh78CoVmeERcf3zWgSQ1D3WSOmN5qYuNI8l IFtg== X-Gm-Message-State: APjAAAV5hyfc2QM+XX7mAE9AFqZFDNGxgRDtW+4/qzgtuF36LdrmNTp5 bOZo0O//eooW0rc+1fKyEuWX1+1qDlCV5e0gExAqze2d8PJkIuQrYGSkkOj0loUCzrngUIj/vOd 49/SSDWw7UJdckTHtyiAIvLyxNpHh X-Received: by 2002:a02:8a4a:: with SMTP id e10mr2372288jal.120.1553018067993; Tue, 19 Mar 2019 10:54:27 -0700 (PDT) X-Received: by 2002:a02:8a4a:: with SMTP id e10mr2372261jal.120.1553018067807; Tue, 19 Mar 2019 10:54:27 -0700 (PDT) Received: from cs-u-syssec1.dtc.umn.edu (cs-u-syssec1.cs.umn.edu. [128.101.106.66]) by smtp.gmail.com with ESMTPSA id u66sm6040113ioe.74.2019.03.19.10.54.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Mar 2019 10:54:27 -0700 (PDT) From: Aditya Pakki To: pakki001@umn.edu Cc: kjlu@umn.edu, Alim Akhtar , Avri Altman , Pedro Sousa , "James E.J. Bottomley" , "Martin K. Petersen" , Subhash Jadavani , Asutosh Das , Marc Gonzalez , Bjorn Andersson , Ohad Sharabi , Vivek Gautam , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] scsi: ufs: Fix to check the return value of alloc_ordered_workqueue Date: Tue, 19 Mar 2019 12:54:22 -0500 Message-Id: <20190319175423.13724-1-pakki001@umn.edu> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In ufshcd_init_clk_gating, alloc_ordered_workqueue may fail and return NULL. The patch handles error consistent with other invocations in this module. Signed-off-by: Aditya Pakki --- drivers/scsi/ufs/ufshcd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index e040f9dd9ff3..701b2da25f09 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -1791,6 +1791,8 @@ static void ufshcd_init_clk_gating(struct ufs_hba *hba) hba->host->host_no); hba->clk_gating.clk_gating_workq = alloc_ordered_workqueue(wq_name, WQ_MEM_RECLAIM); + if (!hba->clk_gating.clk_gating_workq) + dev_err(hba->dev, "Failed to allocate work queue\n"); hba->clk_gating.is_enabled = true; -- 2.17.1