Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3442543imm; Tue, 17 Jul 2018 05:04:20 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcI9W+8ZhQAr7kW18V5ZOKMxp4odY3v/JFFABDnPB1FM5KJg2HbugblbZ3gdOEMlGdlTUD1 X-Received: by 2002:a65:45cc:: with SMTP id m12-v6mr1349634pgr.160.1531829060273; Tue, 17 Jul 2018 05:04:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531829060; cv=none; d=google.com; s=arc-20160816; b=Yc3ElpkpVkaHxLBaJ1hxsBSND4//dNOcxunorxqLyhV/tkD9EjEUWtwreCzw7AFnjA a3GGA5l7BEQ0sSzNqGaaHKGA2oVj3sZDCc4XkIN35yUzmEMC+UFhIBT9o94V/C9XQvkR zTBTYlueLLIvZLYZVZphWX2998STGr/NDI0epw4Ub5szB5Si+nVWhnj4xCFNJZLoKZ8C TbAm8+mOfv4avxtZCOoSLD3D2fMJXdmgnaWjr0F7TEoRH87xiuDPDRQDoBNKDBewfqPM PPJ29bM3PwvFZTXN5WyCILv6yZ2tLsq5hiqunt143LXeRiTfJG0p5eh6MyKRUF83S3Jw DSPA== 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:arc-authentication-results; bh=ZpA6K+CHXs0h/hfU8hcGiB7lprfK/b3I20WZX9HufpY=; b=OQbuMeEOmYXeUhAoFBQt4Uw+vjpMR6VF3zEuelvCpoxQCylzZX0B9ewEVUYsaO8xlW OwP0XCd5ZM9ClrXSypLrtu576rCzgHzdNFmp3Td8NOZNdX4Ho9/FkcUFgdZqUXHH7OLE LALFVJN0ZR72t385QH12Hiy5yw9zbA8UVIL/MVnJeDhEJxBjeNhslwR74fNj+4U9kxsS uCENMdRcKLtjitFudDTm4vTTchobfA6wiDkKpGM2FMjnOdewamJG3zScoizuj1OdYYxI fDRznP6pr0ZGySitz2UClA0DYblrqfohqv3IL3uOmXs5spK0tnZwPkduy2G8NFb/XO7d 8ByA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kduwpb4P; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o84-v6si798770pfa.15.2018.07.17.05.04.05; Tue, 17 Jul 2018 05:04:20 -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=@gmail.com header.s=20161025 header.b=kduwpb4P; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731404AbeGQMfE (ORCPT + 99 others); Tue, 17 Jul 2018 08:35:04 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:37384 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731186AbeGQMfD (ORCPT ); Tue, 17 Jul 2018 08:35:03 -0400 Received: by mail-pf0-f195.google.com with SMTP id a26-v6so400394pfo.4; Tue, 17 Jul 2018 05:02:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=ZpA6K+CHXs0h/hfU8hcGiB7lprfK/b3I20WZX9HufpY=; b=kduwpb4PqMFdVKjobYd8MgFMz6iRDtnWQpuTBY5unqCPPv1Mh0gmGWXZG7DVC4a9iA BJw/QhDl694M3xfyE7zL0Ji3o5qJFxKEuOL8U6qsxnycbIciqbt0Le1Pzn/1NR3+9ta9 Ug5w7373tax6o2OQkLlaTBfUtCRZOxaFGL/mxxGuKhXdgygKOXHEdWSXuOerBg53rqFQ XnrlmRCFG+pD6HF6WzHp1YE3aMdfXErVBcmcdx5tZHiUgRf4QJuyqff2KHYxaGPH7fgn u/gYbzgQsP9skRVjnijvQzAUCOAejTcQK1kvkds7MEuStkBZzzMQPz15TiI5GIix5FO9 lqFg== 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=ZpA6K+CHXs0h/hfU8hcGiB7lprfK/b3I20WZX9HufpY=; b=iwutVLt5mzERvn+x1HfC8EMeToXQzM2QmERhDhCqIs95VmxJ/oH1IwaCyv71a3c8nf bGh7TcBvKY3CvS86mCw5MvLTvJTxQkA8Fj1mctW5Rn8NuZSDUBOO/j8Qbi9RtmAa1ARv 0Ydxw5wNim9J7h+3dYH6hKLjMRDqnzEJG429Aqf8L/1oB4lsCIbr307C1iMYvoj1TRDB pFHQU/BbCSKi+KDr0RKruPhV3z5JH5F+YNijjFdOIYwvMUvMe8uLPng8gOWoysVp7m+0 N0Vgj4Oc9NuXEq6V0gSzRtOVAFSc8w9xpAF7gbgoB+c/COGeKducE2CrasvU3T4afvk7 cG6A== X-Gm-Message-State: AOUpUlGZY9xWCl4DvhT4lwkuUByvPa6wxdutHGDy/U3TSqAowyvx+mno uAHYlO4UpBtBK6XJ0Q8+1qwDq72C X-Received: by 2002:a62:d8c:: with SMTP id 12-v6mr407736pfn.202.1531828964270; Tue, 17 Jul 2018 05:02:44 -0700 (PDT) Received: from raghu-VirtualBox ([116.197.184.12]) by smtp.gmail.com with ESMTPSA id o26-v6sm1663804pfi.167.2018.07.17.05.02.42 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Jul 2018 05:02:43 -0700 (PDT) From: RAGHU Halharvi To: inux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org, linux-bluetooth@vger.kernel.org Cc: RAGHU Halharvi , marcel@holtmann.org, johan.hedberg@gmail.com Subject: [PATCH] Bluetooth:hci_bcm:Check return value from devm_clk_get Date: Tue, 17 Jul 2018 17:32:37 +0530 Message-Id: <20180717120237.25030-1-raghuhack78@gmail.com> 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 * Check return value from devm_clk_get & return appropriate error. --- drivers/bluetooth/hci_bcm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/bluetooth/hci_bcm.c b/drivers/bluetooth/hci_bcm.c index 441f5e1deb11..1295cc89d702 100644 --- a/drivers/bluetooth/hci_bcm.c +++ b/drivers/bluetooth/hci_bcm.c @@ -910,6 +910,8 @@ static int bcm_get_resources(struct bcm_device *dev) return 0; dev->clk = devm_clk_get(dev->dev, NULL); + if (IS_ERR(dev->clk)) + return PTR_ERR(dev->clk); dev->device_wakeup = devm_gpiod_get_optional(dev->dev, "device-wakeup", GPIOD_OUT_LOW); -- 2.17.1