stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org,
	Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
	Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Mauro Carvalho Chehab <mchehab@s-opensource.com>
Subject: [PATCH 4.8 1/4] [media] v4l: rcar-fcp: Dont force users to check for disabled FCP support
Date: Wed, 19 Oct 2016 20:31:26 +0200	[thread overview]
Message-ID: <20161019182927.801409627@linuxfoundation.org> (raw)
In-Reply-To: <20161019182927.746970025@linuxfoundation.org>

4.8-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

commit fd44aa9a254b18176ec3792a18e7de6977030ca8 upstream.

The rcar_fcp_enable() function immediately returns successfully when the
FCP device pointer is NULL to avoid forcing the users to check the FCP
device manually before every call. However, the stub version of the
function used when the FCP driver is disabled returns -ENOSYS
unconditionally, resulting in a different API contract for the two
versions of the function.

As a user that requires FCP support will fail at probe time when calling
rcar_fcp_get() if the FCP driver is disabled, the stub version of the
rcar_fcp_enable() function will only be called with a NULL FCP device.
We can thus return 0 unconditionally to align the behaviour with the
normal version of the function.

Reported-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 include/media/rcar-fcp.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/include/media/rcar-fcp.h
+++ b/include/media/rcar-fcp.h
@@ -29,7 +29,7 @@ static inline struct rcar_fcp_device *rc
 static inline void rcar_fcp_put(struct rcar_fcp_device *fcp) { }
 static inline int rcar_fcp_enable(struct rcar_fcp_device *fcp)
 {
-	return -ENOSYS;
+	return 0;
 }
 static inline void rcar_fcp_disable(struct rcar_fcp_device *fcp) { }
 #endif



  reply	other threads:[~2016-10-19 18:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20161019183131uscas1p2a3227010e6cca676e3d69310f26c86d4@uscas1p2.samsung.com>
2016-10-19 18:31 ` [PATCH 4.8 0/4] 4.8.3-stable review Greg Kroah-Hartman
2016-10-19 18:31   ` Greg Kroah-Hartman [this message]
2016-10-19 18:31   ` [PATCH 4.8 2/4] scsi: configure runtime pm before calling device_add in scsi_add_host_with_dma Greg Kroah-Hartman
2016-10-19 18:31   ` [PATCH 4.8 3/4] Make __xfs_xattr_put_listen preperly report errors Greg Kroah-Hartman
2016-10-19 18:31   ` [PATCH 4.8 4/4] mm: remove gup_flags FOLL_WRITE games from __get_user_pages() Greg Kroah-Hartman
2016-10-19 22:30   ` [PATCH 4.8 0/4] 4.8.3-stable review Shuah Khan
2016-10-20  8:14     ` Greg Kroah-Hartman
2016-10-20  1:44   ` Guenter Roeck
2016-10-20  8:15     ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161019182927.801409627@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=geert+renesas@glider.be \
    --cc=laurent.pinchart+renesas@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@s-opensource.com \
    --cc=sergei.shtylyov@cogentembedded.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).