mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 21:30:54 +07:00
Input: soc_button_array - use 'dev' instead of dereferencing it
Use local variable 'dev' instead of dereferencing it several times. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:
parent
9e85aa6956
commit
aa45590ae8
@ -167,12 +167,12 @@ static int soc_button_probe(struct platform_device *pdev)
|
||||
|
||||
button_info = (struct soc_button_info *)id->driver_data;
|
||||
|
||||
if (gpiod_count(&pdev->dev, KBUILD_MODNAME) <= 0) {
|
||||
dev_dbg(&pdev->dev, "no GPIO attached, ignoring...\n");
|
||||
if (gpiod_count(dev, KBUILD_MODNAME) <= 0) {
|
||||
dev_dbg(dev, "no GPIO attached, ignoring...\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
|
||||
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
|
||||
if (!priv)
|
||||
return -ENOMEM;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user