mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01:00
thermal: ti-soc-thermal: Fix the return value in ti_bandgap_get_sensor_data() kernel-doc
ti_bandgap_get_sensor_data() returns an ERR_PTR() if the bandgap
instance or sensor ID is invalid. Otherwise it returns the stored sensor
data, which can be NULL if no data has been set or the stored value has
been cleared.
This mismatch was already present in omap_bandgap_get_sensor_data() when
the driver was introduced in staging.
Document the validation errors while retaining NULL as a possible stored
value.
Fixes: 8feaf0ce1a ("staging: OMAP4+: thermal: introduce bandgap temperature sensor")
Assisted-by: LLM
Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@kernel.org>
Link: https://patch.msgid.link/20260912062252.42762-1-kmehltretter@gmail.com
This commit is contained in:
parent
379ae6766d
commit
82bb005cd9
|
|
@ -576,7 +576,8 @@ int ti_bandgap_set_sensor_data(struct ti_bandgap *bgp, int id, void *data)
|
|||
* @bgp: pointer to bandgap instance
|
||||
* @id: sensor id
|
||||
*
|
||||
* Return: data stored by set function with sensor id on success or NULL
|
||||
* Return: the stored sensor data, which may be %NULL, or an ERR_PTR()
|
||||
* if @bgp or @id is invalid.
|
||||
*/
|
||||
void *ti_bandgap_get_sensor_data(struct ti_bandgap *bgp, int id)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user