From dfd2d218e37abac1b910a721102c6132fad7abaa Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Wed, 27 Jun 2018 06:30:05 -0600 Subject: [PATCH] fs/mount/fs_automount.c: Ignore return values from work_cancel(). --- fs/mount/fs_automount.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/fs/mount/fs_automount.c b/fs/mount/fs_automount.c index 6c4352acccf..590c6e00146 100644 --- a/fs/mount/fs_automount.c +++ b/fs/mount/fs_automount.c @@ -465,15 +465,12 @@ static int automount_interrupt(FAR const struct automount_lower_s *lower, /* Cancel any pending work. We could get called multiple times if, for * example there is bounce in the detection mechanism. Work is performed * the low priority work queue if it is available. + * + * NOTE: The return values are ignored. The error -ENOENT means that + * there is no work to be canceled. No other errors are expected. */ - ret = work_cancel(LPWORK, &priv->work); - if (ret < 0) - { - /* NOTE: Probably -ENOENT which means only that work is not queued. */ - - ferr("ERROR: Failed to cancel work: %d\n", ret); - } + (void)work_cancel(LPWORK, &priv->work); /* Set the media insertion/removal state */