mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 01:04:41 +01:00
mfd: kempld: Use PTR_ERR_OR_ZERO() to simplify code
Use the standard error pointer macro to shorten the code and simplify. Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com> Link: https://lore.kernel.org/r/20250812093104.103193-1-zhao.xichao@vivo.com Signed-off-by: Lee Jones <lee@kernel.org>
This commit is contained in:
parent
58091331b5
commit
ec9b6f054d
1 changed files with 1 additions and 3 deletions
|
|
@ -141,10 +141,8 @@ static int kempld_create_platform_device(const struct kempld_platform_data *pdat
|
|||
};
|
||||
|
||||
kempld_pdev = platform_device_register_full(&pdevinfo);
|
||||
if (IS_ERR(kempld_pdev))
|
||||
return PTR_ERR(kempld_pdev);
|
||||
|
||||
return 0;
|
||||
return PTR_ERR_OR_ZERO(kempld_pdev);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue