Revision 39eb028183bc7378bb6187067e20bf6d8c836407 authored by Pavel Machek on 18 June 2021, 09:29:48 UTC, committed by David S. Miller on 18 June 2021, 18:56:33 UTC
While fixing coverity warning, commit dd2c79677375 introduced typo in
shift value. Fix that.

Signed-off-by: Pavel Machek (CIP) <pavel@denx.de>
Fixes: dd2c79677375 ("cxgb4: Fix unintentional sign extension issues")
Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 1c200f8
Raw File
nvmem.c
// SPDX-License-Identifier: GPL-2.0
/*
 * RTC subsystem, nvmem interface
 *
 * Copyright (C) 2017 Alexandre Belloni
 */

#include <linux/err.h>
#include <linux/types.h>
#include <linux/nvmem-consumer.h>
#include <linux/rtc.h>

int devm_rtc_nvmem_register(struct rtc_device *rtc,
		       struct nvmem_config *nvmem_config)
{
	struct device *dev = rtc->dev.parent;
	struct nvmem_device *nvmem;

	if (!nvmem_config)
		return -ENODEV;

	nvmem_config->dev = dev;
	nvmem_config->owner = rtc->owner;
	nvmem = devm_nvmem_register(dev, nvmem_config);
	if (IS_ERR(nvmem))
		dev_err(dev, "failed to register nvmem device for RTC\n");

	return PTR_ERR_OR_ZERO(nvmem);
}
EXPORT_SYMBOL_GPL(devm_rtc_nvmem_register);
back to top