diff mbox

[2/3] spi: s3c64xx: remove a compilation warning with an assignment

Message ID 1402390859-28287-3-git-send-email-ch.naveen@samsung.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Naveen Krishna Chatradhi June 10, 2014, 9 a.m. UTC
This patch returns an integer error value instead of the
pointer.

"warning: return makes integer from pointer without a cast"

Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Cc: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Cc: Doug Anderson <dianders@chromium.org>
---
 drivers/spi/spi-s3c64xx.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Sachin Kamat June 10, 2014, 9:45 a.m. UTC | #1
Hi Naveen,

On Tue, Jun 10, 2014 at 2:30 PM, Naveen Krishna Chatradhi
<ch.naveen@samsung.com> wrote:
> This patch returns an integer error value instead of the
> pointer.
>
> "warning: return makes integer from pointer without a cast"
>
> Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
> Cc: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
> Cc: Doug Anderson <dianders@chromium.org>
> ---
>  drivers/spi/spi-s3c64xx.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
> index 0c6013f..4594dde 100644
> --- a/drivers/spi/spi-s3c64xx.c
> +++ b/drivers/spi/spi-s3c64xx.c
> @@ -817,7 +817,7 @@ static int s3c64xx_spi_setup(struct spi_device *spi)
>
>         if (!spi->dev.of_node) {
>                 dev_err(&spi->dev, "device node not found\n");
> -               return ERR_PTR(-EINVAL);
> +               return -EINVAL;

Isn't this warning introduced by the previous patch (patch1/3)?
If so then this patch should be squashed into that.
Naveen Krishna Ch June 10, 2014, 9:53 a.m. UTC | #2
Hello Sachin,

On 10 June 2014 15:15, Sachin Kamat <spk.linux@gmail.com> wrote:
> Hi Naveen,
>
> On Tue, Jun 10, 2014 at 2:30 PM, Naveen Krishna Chatradhi
> <ch.naveen@samsung.com> wrote:
>> This patch returns an integer error value instead of the
>> pointer.
>>
>> "warning: return makes integer from pointer without a cast"
>>
>> Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
>> Cc: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
>> Cc: Doug Anderson <dianders@chromium.org>
>> ---
>>  drivers/spi/spi-s3c64xx.c |    2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
>> index 0c6013f..4594dde 100644
>> --- a/drivers/spi/spi-s3c64xx.c
>> +++ b/drivers/spi/spi-s3c64xx.c
>> @@ -817,7 +817,7 @@ static int s3c64xx_spi_setup(struct spi_device *spi)
>>
>>         if (!spi->dev.of_node) {
>>                 dev_err(&spi->dev, "device node not found\n");
>> -               return ERR_PTR(-EINVAL);
>> +               return -EINVAL;
>
> Isn't this warning introduced by the previous patch (patch1/3)?
> If so then this patch should be squashed into that.
You are right, I've introduced this warning in the 1st patch.
But, realized it only latter. Will spin along with the documentation.
>
> --
> Regards,
> Sachin.
diff mbox

Patch

diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
index 0c6013f..4594dde 100644
--- a/drivers/spi/spi-s3c64xx.c
+++ b/drivers/spi/spi-s3c64xx.c
@@ -817,7 +817,7 @@  static int s3c64xx_spi_setup(struct spi_device *spi)
 
 	if (!spi->dev.of_node) {
 		dev_err(&spi->dev, "device node not found\n");
-		return ERR_PTR(-EINVAL);
+		return -EINVAL;
 	}
 
 	sdd = spi_master_get_devdata(spi->master);