All of lore.kernel.org
 help / color / mirror / Atom feed
* [BUG] memstick: core: missing error return code in msb_resume()
@ 2021-03-05  2:45 Jia-Ju Bai
  2021-03-09  8:44 ` Ulf Hansson
  0 siblings, 1 reply; 3+ messages in thread
From: Jia-Ju Bai @ 2021-03-05  2:45 UTC (permalink / raw)
  To: maximlevitsky, oakad, ulf.hansson, trix; +Cc: linux-mmc, linux-kernel

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [BUG] memstick: core: missing error return code in msb_resume()
  2021-03-05  2:45 [BUG] memstick: core: missing error return code in msb_resume() Jia-Ju Bai
@ 2021-03-09  8:44 ` Ulf Hansson
  2021-03-09 13:40   ` Jia-Ju Bai
  0 siblings, 1 reply; 3+ messages in thread
From: Ulf Hansson @ 2021-03-09  8:44 UTC (permalink / raw)
  To: Jia-Ju Bai
  Cc: Maxim Levitsky, Alex Dubov, trix, linux-mmc, Linux Kernel Mailing List

On Fri, 5 Mar 2021 at 03:45, Jia-Ju Bai <baijiaju1990@gmail.com> wrote:
>
> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [BUG] memstick: core: missing error return code in msb_resume()
  2021-03-09  8:44 ` Ulf Hansson
@ 2021-03-09 13:40   ` Jia-Ju Bai
  0 siblings, 0 replies; 3+ messages in thread
From: Jia-Ju Bai @ 2021-03-09 13:40 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Maxim Levitsky, Alex Dubov, trix, linux-mmc, Linux Kernel Mailing List



On 2021/3/9 16:44, Ulf Hansson wrote:
> On Fri, 5 Mar 2021 at 03:45, Jia-Ju Bai <baijiaju1990@gmail.com> wrote:
>> 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.
>

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


Best wishes,
Jia-Ju Bai

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-03-09 13:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-05  2:45 [BUG] memstick: core: missing error return code in msb_resume() Jia-Ju Bai
2021-03-09  8:44 ` Ulf Hansson
2021-03-09 13:40   ` Jia-Ju Bai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.