aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/mlx5tool/mlx5tool.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/mlx5tool/mlx5tool.c')
-rw-r--r--usr.sbin/mlx5tool/mlx5tool.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/usr.sbin/mlx5tool/mlx5tool.c b/usr.sbin/mlx5tool/mlx5tool.c
index d52534f77d10..0193837032a5 100644
--- a/usr.sbin/mlx5tool/mlx5tool.c
+++ b/usr.sbin/mlx5tool/mlx5tool.c
@@ -47,6 +47,10 @@ parse_pci_addr(const char *addrstr, struct mlx5_fwdump_addr *addr)
unsigned long selarr[4];
int i;
+ if (addrstr == NULL) {
+ warnx("no pci address specified");
+ return (1);
+ }
if (strncmp(addrstr, "pci", 3) == 0) {
addrstr += 3;
i = 0;