codec_adapter: remove pointless null pointer check

We should always have a dev, and even if we didn't we would crash here
because we logged above in debug using dev and we are logging the
error itself using dev.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
This commit is contained in:
Curtis Malainey 2021-09-21 16:29:32 -07:00 committed by Liam Girdwood
parent b72d3c2446
commit 2c4f57d0f2
2 changed files with 3 additions and 7 deletions

View File

@ -29,7 +29,7 @@ codec_load_config(struct comp_dev *dev, void *cfg, size_t size,
comp_dbg(dev, "codec_load_config() start");
if (!dev || !cfg || !size) {
if (!cfg || !size) {
comp_err(dev, "codec_load_config(): wrong input params! dev %x, cfg %x size %d",
(uint32_t)dev, (uint32_t)cfg, size);
return -EINVAL;

View File

@ -45,7 +45,7 @@ struct comp_dev *codec_adapter_new(const struct comp_driver *drv,
comp_cl_dbg(drv, "codec_adapter_new() start");
if (!drv || !config) {
if (!config) {
comp_cl_err(drv, "codec_adapter_new(), wrong input params! drv = %x config = %x",
(uint32_t)drv, (uint32_t)config);
return NULL;
@ -123,11 +123,7 @@ int load_setup_config(struct comp_dev *dev, void *cfg, uint32_t size)
comp_dbg(dev, "load_setup_config() start.");
if (!dev) {
comp_err(dev, "load_setup_config(): no component device.");
ret = -EINVAL;
goto end;
} else if (!cfg || !size) {
if (!cfg || !size) {
comp_err(dev, "load_setup_config(): no config available cfg: %x, size: %d",
(uintptr_t)cfg, size);
ret = -EINVAL;