Re: [PATCH 5/5] ASoC: qcom: apq8016_sbc: Allow routing audio through QDSP6

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 03/12/2021 15:09, Stephan Gerhold wrote:
+	add_ops = device_get_match_data(&pdev->dev);
+	if (!add_ops)
+		return -EINVAL;
We will never hit the error case here because without a match we can not
even enter the probe function.

Theoretically it's possible to create platform devices through other
ways than the device tree (think of old board C files for example).
I agree that nobody should do that, but having this check here
at least avoids a NULL pointer dereference in this unlikely scenario.

Please let me know if I should remove it anyway, that's fine for me!
TBH, I don't have very strong opinion on this.

Great, can I assume your Reviewed-by: applies without any changes then?

yes sure.

--srini



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux