get_permalink returning site home url instead of the url of slug being passed

get_permalink returning site home url instead of the url of slug being passed