lkml.org 
[lkml]   [2021]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] nvme: Fix missing error code in nvme_configure_directives()
On Thu, Sep 09, 2021 at 07:47:39AM -0700, Keith Busch wrote:
> On Thu, Sep 09, 2021 at 05:50:21PM +0800, Jiapeng Chong wrote:
> > From: chongjiapeng <jiapeng.chong@linux.alibaba.com>
> >
> > The error code is missing in this code scenario, add the error code
> > '-EINVAL' to the return value 'ret'.
> >
> > Eliminate the follow smatch warning:
> >
> > drivers/nvme/host/core.c:786 nvme_configure_directives() warn: missing
> > error code 'ret'.
>
> Nak, the code is correct as-is. Returning a negative error for this
> harmless condition will result in disabling the controller when we can
> proceed just fine without directives.

Oh, indeed. We should probably throw a comment in to make this more
clear.

\
 
 \ /
  Last update: 2021-09-09 16:51    [W:1.319 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site