Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2662316pxj; Mon, 14 Jun 2021 04:19:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyiLDT8NZJEc4/vl627Q4cofyGiVrBcFrbzj18azQTMydhhudUDC20kLmeZ37FO9tLcmIOC X-Received: by 2002:a17:907:9618:: with SMTP id gb24mr15399320ejc.111.1623669590676; Mon, 14 Jun 2021 04:19:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623669590; cv=none; d=google.com; s=arc-20160816; b=NG6KY/7wJmqR7WTPNUaUaN3LpH5bITa2Pjyba87v1cdnNllt1uNnHD3ctIUv/n2M2y ku4pxfsObhOk7lfSZ9avaV+gsbV02GGmkULxPgL/soeBH1PHsltkL3HLjgfL6yBnOfd9 /ldK6KndprwEOa8a5Q70CeaoZknHatrPtyb4LxtS/BhufbbzxFHRqHX47Nsy57ck1OJs /jLGZED0SpXOwcWDvInDK/ssENFf/HOCyV4O1DfWmKcpjwNo3qYPkNgx2KEAPWMILQyW DS0qIdoZVo+72ZdIVhALhezGVCU3YiE+MHd4FO0ZJMN6N01/8qRfWb72tBccnvzOJJqi 8p4g== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=D6heLrJXPVxYZUHGOhhg8fkweupJTSYQGBuxGxCVHPU=; b=P3DQfpTYCb3hEo3n9pTCopH4fV042zC2BfhsADeBhVo+Li8SQ/VYpvI5LM3ZdmHdPz bcqeYjBCzHH9z1TH5IKDlq2c6di1OHyohxsZnxCG/FfVuPRUSLR8t8ICNgp2sOwa0EuF IdSliz6mYuSiPkdEWCQqmGvmmk04xkzVcPqDAwlZiBTXXyKFfB4Zw2O+vjoKy26P5OjH xU3bKUWl+LmredJvSWDI+ZrFGscBzKYfE+qy7QE20FyvU3GPqqByO950QJ59Qul4/R3M 8+qi27hHT+euEOkauadYyaYfOsQ4eOFoBZ8ZKgxr7z2ngz8KhzzcLOV5Uawl+XahDnuL 6ejg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=GHN9w1+a; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 18si10946075ejr.397.2021.06.14.04.19.27; Mon, 14 Jun 2021 04:19:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=GHN9w1+a; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235970AbhFNLTy (ORCPT + 99 others); Mon, 14 Jun 2021 07:19:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:39866 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234711AbhFNLGm (ORCPT ); Mon, 14 Jun 2021 07:06:42 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 93C8D61926; Mon, 14 Jun 2021 10:45:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1623667530; bh=eqeihHTWHF6Qu3ZQpWRNZPeMqFh+DvbpQG4aY32zYsw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GHN9w1+a/OxK4sOUhl460kCciQAoXYasPHjMotCRh+I/5+rqjCYaeY0db4JQRQTas sDR5VfyNOZQGOrW55xzVqQ43FahBVFV2KMuTTQzegnmsMFPmRtlpIFo78sDoaD8F2e eVHgbZFxnz2wf4K/sriN06F8O+tG4YZw5Mjwo2nE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Heikki Krogerus , Andy Shevchenko Subject: [PATCH 5.10 079/131] usb: typec: intel_pmc_mux: Add missed error check for devm_ioremap_resource() Date: Mon, 14 Jun 2021 12:27:20 +0200 Message-Id: <20210614102655.710732959@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210614102652.964395392@linuxfoundation.org> References: <20210614102652.964395392@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Andy Shevchenko commit 843fabdd7623271330af07f1b7fbd7fabe33c8de upstream. devm_ioremap_resource() can return an error, add missed check for it. Fixes: 43d596e32276 ("usb: typec: intel_pmc_mux: Check the port status before connect") Reviewed-by: Heikki Krogerus Signed-off-by: Andy Shevchenko Cc: stable Link: https://lore.kernel.org/r/20210607205007.71458-2-andy.shevchenko@gmail.com Signed-off-by: Greg Kroah-Hartman --- drivers/usb/typec/mux/intel_pmc_mux.c | 5 +++++ 1 file changed, 5 insertions(+) --- a/drivers/usb/typec/mux/intel_pmc_mux.c +++ b/drivers/usb/typec/mux/intel_pmc_mux.c @@ -573,6 +573,11 @@ static int pmc_usb_probe_iom(struct pmc_ return -ENOMEM; } + if (IS_ERR(pmc->iom_base)) { + put_device(&adev->dev); + return PTR_ERR(pmc->iom_base); + } + pmc->iom_adev = adev; return 0;