Skip to contentSkip to conversation

memstick: core: missing error return code in msb_resume()

BUG Jia-Ju Bai 2 participants 3 messages Mar 5, 2021 – Mar 9, 2021 MMC, SD and SDIO

lore
Share & tools
lore

Jia-Ju Bai

author
#0 lore raw

My static analysis tool reports that no error return code is assigned in error handling code of msb_resume(). However, many other drivers assign error return code in xxx_resume(), such as sky2_resume() and e1000_resume(). I wonder whether this is intentional?

Best wishes,
Jia-Ju Bai

#1 lore raw
Quoted 6 lines · Jia-Ju Bai

My static analysis tool reports that no error return code is assigned in error handling code of msb_resume().
However, many other drivers assign error return code in xxx_resume(), such as sky2_resume() and e1000_resume().
I wonder whether this is intentional?

It's for sure intentional, but it really doesn't matter that much as we are probably in rather dodgy state anyways.

Of course, propagating error codes upwards in the stack is always good practise, so feel free to add it.

Kind regards
Uffe

author
#2 lore raw
Quoted 6 lines · Ulf Hansson
Quoted 5 lines · Jia-Ju Bai

My static analysis tool reports that no error return code is assigned in error handling code of msb_resume().
However, many other drivers assign error return code in xxx_resume(), such as sky2_resume() and e1000_resume().
I wonder whether this is intentional?

Quoted 6 lines

It's for sure intentional, but it really doesn't matter that much as we are probably in rather dodgy state anyways.

Of course, propagating error codes upwards in the stack is always good practise, so feel free to add it.

Thanks for the reply!
I will find time to add error return code in this function :)

Best wishes,
Jia-Ju Bai