On 27.02.2024 16:53, Mukesh Ojha wrote: > There are multiple place in SCM driver __scm->dev is being > accessed without checking if it is valid or not and all > not all of function needs the device but it is needed > for some cases when the number of argument passed is more > and dma_map_single () api is used. > > Add a NULL check for the cases when it is fine even to pass > device as NULL and add qcom_scm_is_available() check for > cases when it is needed for DMA api's. > > Signed-off-by: Mukesh Ojha <quic_mojha@xxxxxxxxxxx> > --- Most (all?) drivers calling into SCM already check is_available() at probe time. I'm not sure returning -EPROBE_DEFER would be good for calls outside .probe. Konrad