Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp13473829ybl; Sun, 29 Dec 2019 12:46:11 -0800 (PST) X-Google-Smtp-Source: APXvYqzqOWkTw+wFa7oKdNJFJnnEnLFJK2Fu6YBcuBeZ0lxbYJMbL1D1FMjpFwryPm6H0dmdG/U3 X-Received: by 2002:a9d:5c1:: with SMTP id 59mr71438945otd.192.1577652371722; Sun, 29 Dec 2019 12:46:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577652371; cv=none; d=google.com; s=arc-20160816; b=M1Z8h+oW/gsd6n73RIFzXoVO3ZF5GSXQLe98gUGb3XicqbxHRpgc7WF8CeRxOS74sQ 0VU/HSegPnTb1r8zWo+8SF6mABmhN+Bh4RKwJlqTEYH/RWul/itzu1cFSVLS/EhrqRxF 8n7Isv0ZRM2sucMds2t0FeLE82rRl5/DOXeIYsAX4nTvHcdywIvP/7jiCVMdV5FFnUS3 F32JOQab9vj45LjKav+ZfWDotws9mk+lObR+f8DxekXGIfza1lV+Z0uNONOD7v/9fUW2 GHvrNbiMcrLQrGV9L/76J8R7JR8P9mv64KaBFNmcqMZIhCAprfKRMhZs1keX3RBneezf XnHQ== 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:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=3wrx9OWC7GRLJ+WzyaSpM2EBdUBTDndHQqtNFsnyihY=; b=De1+RXGqH/Yht00rukyEyj6m6s92AeR/UvopE/dg4/ARa6gyWymIqjnv7bXMv0FItZ LJhFXS2I20tK/6BYnSjHyiTsAKMDIbP/w5Q5Wa1KKZkKmZCYzB1GLVkdTzRtQJfKe5gc wopFaTtxFgw4b6tZxQkDTX6NJZJYQibIO4OfOqpTdolb/lroCMtPY+mdbyGe770XiT03 QDjs8ZtuujxILOPP7nJKGq7jBTgyUfEVBT4VXOI4X/FphZGldumpP0lNCQsr4V0DN8Ff NJDuObJEN3i654ggRJdcyQAxPsdeMQMbgdF+jgNHuP+7RtAaIukP2WlKEJ5Z8NP7p9ob Rs/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SAHmB7vQ; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q6si26340550otg.248.2019.12.29.12.46.00; Sun, 29 Dec 2019 12:46:11 -0800 (PST) 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=@kernel.org header.s=default header.b=SAHmB7vQ; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731334AbfL2Rrr (ORCPT + 99 others); Sun, 29 Dec 2019 12:47:47 -0500 Received: from mail.kernel.org ([198.145.29.99]:58604 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731323AbfL2Rrp (ORCPT ); Sun, 29 Dec 2019 12:47:45 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 17C03208C4; Sun, 29 Dec 2019 17:47:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577641665; bh=LXYiXgod8Q1KuufpoU54Za2Mw1z6mmO+GcTyh3GQB30=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SAHmB7vQZknPXvTwtLtPH/8C6g8X7GPX+Os1IAB25ru+9Nzks+cHJe5fmhQ6kfKHm TQdcXj3MQLWy/4I3gnnboKUd7dINsb85JG1O9tdqA8GzbzvgYpwyTf18WRVBfeqLJj N86zqGLOdDOxAPD/FpgXXt700Xx8mSnAHqM+iNQs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chuhong Yuan , Dan Carpenter , Alexandru Ardelean , Jonathan Cameron , Sasha Levin Subject: [PATCH 5.4 161/434] staging: iio: ad9834: add a check for devm_clk_get Date: Sun, 29 Dec 2019 18:23:34 +0100 Message-Id: <20191229172712.466855783@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191229172702.393141737@linuxfoundation.org> References: <20191229172702.393141737@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chuhong Yuan [ Upstream commit a96de139301385e5992768c0f60240ddfbb33325 ] ad9834_probe misses a check for devm_clk_get and may cause problems. Add a check like what ad9832 does to fix it. Signed-off-by: Chuhong Yuan Reviewed-by: Dan Carpenter Reviewed-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron Signed-off-by: Sasha Levin --- drivers/staging/iio/frequency/ad9834.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/staging/iio/frequency/ad9834.c b/drivers/staging/iio/frequency/ad9834.c index 038d6732c3fd..23026978a5a5 100644 --- a/drivers/staging/iio/frequency/ad9834.c +++ b/drivers/staging/iio/frequency/ad9834.c @@ -417,6 +417,10 @@ static int ad9834_probe(struct spi_device *spi) st = iio_priv(indio_dev); mutex_init(&st->lock); st->mclk = devm_clk_get(&spi->dev, NULL); + if (IS_ERR(st->mclk)) { + ret = PTR_ERR(st->mclk); + goto error_disable_reg; + } ret = clk_prepare_enable(st->mclk); if (ret) { -- 2.20.1