Message ID | 20190617125105.6186-5-lee.jones@linaro.org (mailing list archive) |
---|---|
State | Mainlined |
Commit | 7f5d6a4696170ca7394d9dcecd5a54ebe2b9a067 |
Headers | show |
Series | I2C: DWC3 USB: Add support for ACPI based AArch64 Laptops | expand |
diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c index 2d050303d564..c59e9d8e8609 100644 --- a/drivers/usb/dwc3/dwc3-qcom.c +++ b/drivers/usb/dwc3/dwc3-qcom.c @@ -409,6 +409,9 @@ static int dwc3_qcom_clk_init(struct dwc3_qcom *qcom, int count) if (!np || !count) return 0; + if (count < 0) + return count; + qcom->num_clocks = count; qcom->clks = devm_kcalloc(dev, qcom->num_clocks,