mirror of
https://github.com/torvalds/linux.git
synced 2026-10-10 20:38:02 +02:00
wifi: ath10k: Drop redundant NULL check on devm_clk_get()
devm_clk_get() does not return NULL (only valid clock or ERR pointer), so simplify the code to drop redundant IS_ERR_OR_NULL(). Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com> Link: https://patch.msgid.link/20260705172405.119084-2-krzysztof.kozlowski@oss.qualcomm.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
This commit is contained in:
parent
408ec3ffcc
commit
0078753460
|
|
@ -87,24 +87,24 @@ static int ath10k_ahb_clock_init(struct ath10k *ar)
|
|||
dev = &ar_ahb->pdev->dev;
|
||||
|
||||
ar_ahb->cmd_clk = devm_clk_get(dev, "wifi_wcss_cmd");
|
||||
if (IS_ERR_OR_NULL(ar_ahb->cmd_clk)) {
|
||||
if (IS_ERR(ar_ahb->cmd_clk)) {
|
||||
ath10k_err(ar, "failed to get cmd clk: %ld\n",
|
||||
PTR_ERR(ar_ahb->cmd_clk));
|
||||
return ar_ahb->cmd_clk ? PTR_ERR(ar_ahb->cmd_clk) : -ENODEV;
|
||||
return PTR_ERR(ar_ahb->cmd_clk);
|
||||
}
|
||||
|
||||
ar_ahb->ref_clk = devm_clk_get(dev, "wifi_wcss_ref");
|
||||
if (IS_ERR_OR_NULL(ar_ahb->ref_clk)) {
|
||||
if (IS_ERR(ar_ahb->ref_clk)) {
|
||||
ath10k_err(ar, "failed to get ref clk: %ld\n",
|
||||
PTR_ERR(ar_ahb->ref_clk));
|
||||
return ar_ahb->ref_clk ? PTR_ERR(ar_ahb->ref_clk) : -ENODEV;
|
||||
return PTR_ERR(ar_ahb->ref_clk);
|
||||
}
|
||||
|
||||
ar_ahb->rtc_clk = devm_clk_get(dev, "wifi_wcss_rtc");
|
||||
if (IS_ERR_OR_NULL(ar_ahb->rtc_clk)) {
|
||||
if (IS_ERR(ar_ahb->rtc_clk)) {
|
||||
ath10k_err(ar, "failed to get rtc clk: %ld\n",
|
||||
PTR_ERR(ar_ahb->rtc_clk));
|
||||
return ar_ahb->rtc_clk ? PTR_ERR(ar_ahb->rtc_clk) : -ENODEV;
|
||||
return PTR_ERR(ar_ahb->rtc_clk);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user