From: Hans de Goede <hdegoede@redhat.com>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] platform/x86: x86-android-tablets: Fix an IS_ERR() vs NULL check in probe
Date: Mon, 4 Dec 2023 15:51:30 +0100 [thread overview]
Message-ID: <898ebe87-6376-4385-b42a-25ecc08772f6@redhat.com> (raw)
In-Reply-To: <4b1b2395-c7c5-44a4-b0b0-6d091c7f46a2@moroto.mountain>
Hi,
On 12/4/23 13:29, Dan Carpenter wrote:
> The spi_new_device() function returns NULL on error, it doesn't return
> error pointers.
>
> Fixes: 70505ea6de24 ("platform/x86: x86-android-tablets: Add support for SPI device instantiation")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Thank you for your patch, I've applied this patch to my review-hans
branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans
Note it will show up in my review-hans branch once I've pushed my
local branch there, which might take a while.
Once I've run some tests on this branch the patches there will be
added to the platform-drivers-x86/for-next branch and eventually
will be included in the pdx86 pull-request to Linus for the next
merge-window.
Regards,
Hans
> ---
> drivers/platform/x86/x86-android-tablets/core.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/platform/x86/x86-android-tablets/core.c b/drivers/platform/x86/x86-android-tablets/core.c
> index 6a5975ac3286..f8221a15575b 100644
> --- a/drivers/platform/x86/x86-android-tablets/core.c
> +++ b/drivers/platform/x86/x86-android-tablets/core.c
> @@ -220,8 +220,8 @@ static __init int x86_instantiate_spi_dev(const struct x86_dev_info *dev_info, i
>
> spi_devs[idx] = spi_new_device(controller, &board_info);
> put_device(&controller->dev);
> - if (IS_ERR(spi_devs[idx]))
> - return dev_err_probe(&controller->dev, PTR_ERR(spi_devs[idx]),
> + if (!spi_devs[idx])
> + return dev_err_probe(&controller->dev, -ENOMEM,
> "creating SPI-device %d\n", idx);
>
> return 0;
prev parent reply other threads:[~2023-12-04 14:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-04 12:29 Dan Carpenter
2023-12-04 14:51 ` Hans de Goede [this message]
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=898ebe87-6376-4385-b42a-25ecc08772f6@redhat.com \
--to=hdegoede@redhat.com \
--cc=dan.carpenter@linaro.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@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
all inboxes | Powered by JetHome®