diff mbox

omapdrm: hdmi4_cec: signedness bug in hdmi4_cec_init()

Message ID 20171027062705.tmmlbgerpb2v63bj@mwanda (mailing list archive)
State New, archived
Headers show

Commit Message

Dan Carpenter Oct. 27, 2017, 6:27 a.m. UTC
"ret" needs to be signed for the error handling to work.

Fixes: 8d7f934df8d8 ("omapdrm: hdmi4_cec: add OMAP4 HDMI CEC support")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Comments

Sebastian Reichel Oct. 27, 2017, 6:51 p.m. UTC | #1
Hi,

On Fri, Oct 27, 2017 at 09:27:05AM +0300, Dan Carpenter wrote:
> "ret" needs to be signed for the error handling to work.
> 
> Fixes: 8d7f934df8d8 ("omapdrm: hdmi4_cec: add OMAP4 HDMI CEC support")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>

-- Sebastian

> diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c b/drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c
> index d86873f2abe6..e626eddf24d5 100644
> --- a/drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c
> +++ b/drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c
> @@ -352,7 +352,7 @@ int hdmi4_cec_init(struct platform_device *pdev, struct hdmi_core_data *core,
>  {
>  	const u32 caps = CEC_CAP_TRANSMIT | CEC_CAP_LOG_ADDRS |
>  			 CEC_CAP_PASSTHROUGH | CEC_CAP_RC;
> -	unsigned int ret;
> +	int ret;
>  
>  	core->adap = cec_allocate_adapter(&hdmi_cec_adap_ops, core,
>  		"omap4", caps, CEC_MAX_LOG_ADDRS);
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
Hans Verkuil Oct. 28, 2017, 9:16 a.m. UTC | #2
On 10/27/2017 08:27 AM, Dan Carpenter wrote:
> "ret" needs to be signed for the error handling to work.
> 
> Fixes: 8d7f934df8d8 ("omapdrm: hdmi4_cec: add OMAP4 HDMI CEC support")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Oops! Not sure how that crept in.

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>

Thanks!

	Hans

> 
> diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c b/drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c
> index d86873f2abe6..e626eddf24d5 100644
> --- a/drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c
> +++ b/drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c
> @@ -352,7 +352,7 @@ int hdmi4_cec_init(struct platform_device *pdev, struct hdmi_core_data *core,
>  {
>  	const u32 caps = CEC_CAP_TRANSMIT | CEC_CAP_LOG_ADDRS |
>  			 CEC_CAP_PASSTHROUGH | CEC_CAP_RC;
> -	unsigned int ret;
> +	int ret;
>  
>  	core->adap = cec_allocate_adapter(&hdmi_cec_adap_ops, core,
>  		"omap4", caps, CEC_MAX_LOG_ADDRS);
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
>
Tomi Valkeinen Nov. 21, 2017, 10:30 a.m. UTC | #3
On 27/10/17 09:27, Dan Carpenter wrote:
> "ret" needs to be signed for the error handling to work.
> 
> Fixes: 8d7f934df8d8 ("omapdrm: hdmi4_cec: add OMAP4 HDMI CEC support")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c b/drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c
> index d86873f2abe6..e626eddf24d5 100644
> --- a/drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c
> +++ b/drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c
> @@ -352,7 +352,7 @@ int hdmi4_cec_init(struct platform_device *pdev, struct hdmi_core_data *core,
>  {
>  	const u32 caps = CEC_CAP_TRANSMIT | CEC_CAP_LOG_ADDRS |
>  			 CEC_CAP_PASSTHROUGH | CEC_CAP_RC;
> -	unsigned int ret;
> +	int ret;
>  
>  	core->adap = cec_allocate_adapter(&hdmi_cec_adap_ops, core,
>  		"omap4", caps, CEC_MAX_LOG_ADDRS);
> 

Thanks. I have picked this up.

 Tomi
diff mbox

Patch

diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c b/drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c
index d86873f2abe6..e626eddf24d5 100644
--- a/drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c
+++ b/drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c
@@ -352,7 +352,7 @@  int hdmi4_cec_init(struct platform_device *pdev, struct hdmi_core_data *core,
 {
 	const u32 caps = CEC_CAP_TRANSMIT | CEC_CAP_LOG_ADDRS |
 			 CEC_CAP_PASSTHROUGH | CEC_CAP_RC;
-	unsigned int ret;
+	int ret;
 
 	core->adap = cec_allocate_adapter(&hdmi_cec_adap_ops, core,
 		"omap4", caps, CEC_MAX_LOG_ADDRS);