Skip to contentSkip to conversation

pinctrl: sirf: Add missing put_device() call in sirfsoc_gpio_probe()

PATCH Markus Elfring 2 participants 2 messages Jun 2, 2020 – Jun 3, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw
Quoted 2 lines

in sirfsoc_gpio_probe(), if of_find_device_by_node() succeed, put_device() is missing in the error handling patch.

How do you think about another wording variant?

A coccicheck run provided information like the following.

drivers/pinctrl/sirf/pinctrl-sirf.c:798:2-8: ERROR: missing put_device; call of_find_device_by_node on line 792, but without a corresponding object release within this function.

Generated by: scripts/coccinelle/free/put_device.cocci

Thus add a jump target to fix the exception handling for this function implementation.

Would you like to add the tag “Fixes” to the commit message?

Regards,
Markus

#1 lore raw
Quoted 11 lines · Markus Elfring
Quoted 2 lines

in sirfsoc_gpio_probe(), if of_find_device_by_node() succeed, put_device() is missing in the error handling patch.

How do you think about another wording variant?

A coccicheck run provided information like the following.

drivers/pinctrl/sirf/pinctrl-sirf.c:798:2-8: ERROR: missing put_device; call of_find_device_by_node on line 792, but without a corresponding object release within this function.

Quoted 8 lines

Generated by: scripts/coccinelle/free/put_device.cocci

Thus add a jump target to fix the exception handling for this function implementation.

Would you like to add the tag “Fixes” to the commit message?

Will do, thanks for your advise!

Yu Kuai