Skip to content

Commit 319f83a

Browse files
Yang Lijonmason
authored andcommitted
NTB: Fix an error code in ntb_msit_probe()
When the value of nm->isr_ctx is false, the value of ret is 0. So, we set ret to -ENOMEM to indicate this error. Clean up smatch warning: drivers/ntb/test/ntb_msi_test.c:373 ntb_msit_probe() warn: missing error code 'ret'. Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Reviewed-by: Logan Gunthorpe <logang@deltatee.com> Signed-off-by: Jon Mason <jdmason@kudzu.us>
1 parent f3b6b10 commit 319f83a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

drivers/ntb/test/ntb_msi_test.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,8 +369,10 @@ static int ntb_msit_probe(struct ntb_client *client, struct ntb_dev *ntb)
369369
if (ret)
370370
goto remove_dbgfs;
371371

372-
if (!nm->isr_ctx)
372+
if (!nm->isr_ctx) {
373+
ret = -ENOMEM;
373374
goto remove_dbgfs;
375+
}
374376

375377
ntb_link_enable(ntb, NTB_SPEED_AUTO, NTB_WIDTH_AUTO);
376378

0 commit comments

Comments
 (0)