[dpdk-dev,v2] eal: Fix wrong error checking while parsing device arguments
Commit Message
This patch fixes wrong error checking of rte_eal_parse_devargs_str().
Currently, a return value of strdup() is wrongly checked.
Fixes: 0fe11ec592b2 ("eal: add vdev init and uninit")
Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
---
lib/librte_eal/common/eal_common_devargs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Thu, Jun 16, 2016 at 4:33 AM, Tetsuya Mukawa <mukawa@igel.co.jp> wrote:
> This patch fixes wrong error checking of rte_eal_parse_devargs_str().
> Currently, a return value of strdup() is wrongly checked.
>
> Fixes: 0fe11ec592b2 ("eal: add vdev init and uninit")
> Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Forgot to pass this patch through scripts/check-git-log.sh script :
Wrong headline uppercase:
eal: Fix wrong error checking while parsing device arguments
With this fixed, you can add my ack.
2016-06-17 14:10, David Marchand:
> On Thu, Jun 16, 2016 at 4:33 AM, Tetsuya Mukawa <mukawa@igel.co.jp> wrote:
> > This patch fixes wrong error checking of rte_eal_parse_devargs_str().
> > Currently, a return value of strdup() is wrongly checked.
> >
> > Fixes: 0fe11ec592b2 ("eal: add vdev init and uninit")
> > Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
>
> Forgot to pass this patch through scripts/check-git-log.sh script :
>
> Wrong headline uppercase:
> eal: Fix wrong error checking while parsing device arguments
>
>
> With this fixed, you can add my ack.
Applied, thanks
@@ -58,7 +58,7 @@ rte_eal_parse_devargs_str(const char *devargs_str,
return -1;
*drvname = strdup(devargs_str);
- if (drvname == NULL)
+ if (*drvname == NULL)
return -1;
/* set the first ',' to '\0' to split name and arguments */