From: Dan Carpenter <dan.carpenter@oracle.com>
To: bjorn.andersson@sonymobile.com
Cc: linux-bluetooth@vger.kernel.org
Subject: [bug report] Bluetooth: Introduce Qualcomm WCNSS SMD based HCI driver
Date: Wed, 26 Sep 2018 21:04:20 +0300 [thread overview]
Message-ID: <20180926180419.GA16656@mwanda> (raw)
Hello Bjorn Andersson,
The patch 1511cc750c3d: "Bluetooth: Introduce Qualcomm WCNSS SMD
based HCI driver" from Aug 12, 2016, leads to the following static
checker warning:
drivers/bluetooth/btqcomsmd.c:164 btqcomsmd_probe()
warn: 'btq->acl_channel' isn't an ERR_PTR
drivers/bluetooth/btqcomsmd.c
149 static int btqcomsmd_probe(struct platform_device *pdev)
150 {
151 struct btqcomsmd *btq;
152 struct hci_dev *hdev;
153 void *wcnss;
154 int ret;
155
156 btq = devm_kzalloc(&pdev->dev, sizeof(*btq), GFP_KERNEL);
157 if (!btq)
158 return -ENOMEM;
159
160 wcnss = dev_get_drvdata(pdev->dev.parent);
161
162 btq->acl_channel = qcom_wcnss_open_channel(wcnss, "APPS_RIVA_BT_ACL",
163 btqcomsmd_acl_callback, btq);
164 if (IS_ERR(btq->acl_channel))
165 return PTR_ERR(btq->acl_channel);
The qcom_wcnss_open_channel() returns error pointers if the CONFIG is
disabled, otherwise it returns NULL on error. That seems like a design
mistake to me... Anyway, it leads to a bug here.
166
167 btq->cmd_channel = qcom_wcnss_open_channel(wcnss, "APPS_RIVA_BT_CMD",
168 btqcomsmd_cmd_callback, btq);
169 if (IS_ERR(btq->cmd_channel))
170 return PTR_ERR(btq->cmd_channel);
171
172 /* The local-bd-address property is usually injected by the
regards,
dan carpenter
next reply other threads:[~2018-09-26 18:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-26 18:04 Dan Carpenter [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-04-19 13:51 [bug report] Bluetooth: Introduce Qualcomm WCNSS SMD based HCI driver Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180926180419.GA16656@mwanda \
--to=dan.carpenter@oracle.com \
--cc=bjorn.andersson@sonymobile.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).