Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp979721ybe; Thu, 19 Sep 2019 06:56:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqwFNNWmgSjjoUa1nUG1HbDD1qo3YpdfHpi2bNWcWIt7rJ6yw7FjbjF57xAPD0QtSxS2vUvA X-Received: by 2002:a50:d68a:: with SMTP id r10mr16275002edi.151.1568901370151; Thu, 19 Sep 2019 06:56:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568901370; cv=none; d=google.com; s=arc-20160816; b=K54GdDTEyCwpduV25v6RDvBxipfpR9Vk34Nlk7NYv3ikt/qn+1Q7PnuuYtGvuDK/eK l350nh47jrX/xKibNV8VqZUlEs2juLOWNKEbe/A/ibaVBu5l/A+u61Wxoajya7a691tJ 1NYs9Qt3hIGWKDEN7CST3B04sAzgVAJwIaD4rXZm068V44cKcGCKKkcM18jAOBMZTcYM DP4dGKWGE0xZRfG5ZoQzAkN1V9o4H8fWZAHC1c/6tD0DN1fyAvbCV8ki9PxWZdkCFPH2 6zObaqYofixe34BZ9NsUXEVeGvMQpctS+rFvbZftvIusU8Vh6NGJudAEdA2BO1F0PQC8 30ag== 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:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=m/cvFvrnveoogQ+kkWE2VVpTiKn8anixWJucFrk1Pjs=; b=BXyk++7syQazmBQ71hzpJatNeByddWKcL0OlQ+ikGc/tV9sPtCdUg/3z1M4ebpp/39 x9CxLuMg9Jj40y3gCRK5el/bAtt11jCRdTHxRW51esoX8b6H7E9xv9/kF8HnxJmv5IIm tBR6zR8u1+qh3iucYkl2lAnfDJvq91pdPZML0n16+zpEhTPWwriAZ09T1mhOvFIPf14V WSE2CB4Zv24cGcDbR4dhR7Le0ZhTqET6VQrfl4FG5yuvMBlt+D/Exnhs1QKWYoAA7Wfu vDNEbCrtaz7f/JOSF2D0Vpj8NVdgolSFj3ZH9bvcYQ0y8Fwp3fmz2HAAxAh9kxl0Wide HNiA== 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=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d27si5624458ede.381.2019.09.19.06.55.46; Thu, 19 Sep 2019 06:56:10 -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; 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=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732241AbfISNGp (ORCPT + 99 others); Thu, 19 Sep 2019 09:06:45 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:40276 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731332AbfISNGp (ORCPT ); Thu, 19 Sep 2019 09:06:45 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id 7C76228E9DE Subject: Re: [PATCH] platform/chrome: null check create_singlethread_workqueue To: Navid Emamdoost Cc: emamd001@umn.edu, smccaman@umn.edu, kjlu@umn.edu, Benson Leung , linux-kernel@vger.kernel.org References: <20190911201100.11483-1-navid.emamdoost@gmail.com> From: Enric Balletbo i Serra Message-ID: Date: Thu, 19 Sep 2019 15:06:40 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20190911201100.11483-1-navid.emamdoost@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 11/9/19 22:10, Navid Emamdoost wrote: > In cros_usbpd_logger_probe the return value of > create_singlethread_workqueue may be null, it should be checked. > > Signed-off-by: Navid Emamdoost > --- Applied for 5.4, the patch went to linux-next some time ago, so sorry for late notice. Thanks, Enric > drivers/platform/chrome/cros_usbpd_logger.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/platform/chrome/cros_usbpd_logger.c b/drivers/platform/chrome/cros_usbpd_logger.c > index 7c7b267626a0..c83397955cc3 100644 > --- a/drivers/platform/chrome/cros_usbpd_logger.c > +++ b/drivers/platform/chrome/cros_usbpd_logger.c > @@ -209,6 +209,9 @@ static int cros_usbpd_logger_probe(struct platform_device *pd) > /* Retrieve PD event logs periodically */ > INIT_DELAYED_WORK(&logger->log_work, cros_usbpd_log_check); > logger->log_workqueue = create_singlethread_workqueue("cros_usbpd_log"); > + if (!logger->log_workqueue) > + return -ENOMEM; > + > queue_delayed_work(logger->log_workqueue, &logger->log_work, > CROS_USBPD_LOG_UPDATE_DELAY); > >